[FFmpeg-devel] [PATCH] Add -t option to ffplay

Michael Niedermayer michaelni
Wed Mar 24 15:43:07 CET 2010


On Wed, Mar 24, 2010 at 10:10:46AM +0100, Robert Kr?ger wrote:
> 
> This patch adds a -t option (a la ffmpeg) to ffplay to allow specifying a max duration to play. Together with -ss and -loop a useful tool for reviewing specific parts of video footage (at least that's my use case).
> 
> 
> Regards,
> 
> Robert
> 

>  ffplay.c |   22 ++++++++++++++++++----
>  1 file changed, 18 insertions(+), 4 deletions(-)
> 72bd2076dd96e2ffa341034817df61357c520f22  ffplay-duration-option.patch
> Index: ffplay.c
> ===================================================================
> --- ffplay.c	(revision 22648)
> +++ ffplay.c	(working copy)
> @@ -244,6 +244,7 @@
>  static int show_status = 1;
>  static int av_sync_type = AV_SYNC_AUDIO_MASTER;
>  static int64_t start_time = AV_NOPTS_VALUE;
> +static int64_t duration = AV_NOPTS_VALUE;
>  static int debug = 0;
>  static int debug_mv = 0;
>  static int step = 0;

> @@ -2473,6 +2474,7 @@
>              SDL_Delay(10);
>              continue;
>          }
> +        int64_t effective_start_time = start_time != AV_NOPTS_VALUE ? start_time : 0;
>          if(url_feof(ic->pb) || eof) {
>              if(is->video_stream >= 0){
>                  av_init_packet(pkt);

breaks gcc 2.95


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- M?ns Rullg?rd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100324/22f39db4/attachment.pgp>



More information about the ffmpeg-devel mailing list