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

Robert Krüger krueger
Wed Mar 24 16:34:16 CET 2010


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.




More information about the ffmpeg-devel mailing list