# HG changeset patch # User michael # Date 1165932466 0 # Node ID d440e6a53baeb74d0dc362eeb604e7993698fced # Parent 04aa1ab71309483eaeba32d413954252281bef14 the next r_frame_rate try ... discard first duration accumulate remaining durations add 15000/1001 and 12000/1001 diff -r 04aa1ab71309 -r d440e6a53bae utils.c --- a/utils.c Tue Dec 12 12:29:33 2006 +0000 +++ b/utils.c Tue Dec 12 14:07:46 2006 +0000 @@ -1760,10 +1760,10 @@ /* maximum duration until we stop analysing the stream */ #define MAX_STREAM_DURATION ((int)(AV_TIME_BASE * 3.0)) -#define MAX_STD_TIMEBASES (60*12+3) +#define MAX_STD_TIMEBASES (60*12+5) static int get_std_framerate(int i){ if(i<60*12) return i*1001; - else return ((int[]){24,30,60})[i-60*12]*1000*12; + else return ((int[]){24,30,60,12,15})[i-60*12]*1000*12; } /** @@ -1894,18 +1894,21 @@ // if(st->codec->codec_type == CODEC_TYPE_VIDEO) // av_log(NULL, AV_LOG_ERROR, "%f\n", dur); + if(duration_count[index] > 0){ for(i=1; icodec_info_nb_frames == 0 && 0) st->codec_info_duration += duration; } - last_dts[pkt->stream_index]= pkt->dts; + if(last == AV_NOPTS_VALUE || duration_count[index]<=1) + last_dts[pkt->stream_index]= pkt->dts; } if(st->parser && st->parser->parser->split && !st->codec->extradata){ int i= st->parser->parser->split(st->codec, pkt->data, pkt->size);