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

Michael Niedermayer michaelni
Wed Mar 24 16:37:03 CET 2010


On Wed, Mar 24, 2010 at 04:34:16PM +0100, Robert Kr?ger wrote:
> 
> On 24.03.2010, at 15:43, Michael Niedermayer wrote:
> 
> > 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
> > 
> 
> which aspect of the statement. A hint would be appreciated.

mixing statements and declarations
declarations must be at the begin of blocks (pre C99)

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

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/4e769308/attachment.pgp>



More information about the ffmpeg-devel mailing list