mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
Improve frame rate guessing for streams with two fields per frame.
Patch by Ivan Schreter, schreter gmx net Originally committed as revision 17656 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
da2911d5e8
commit
5fa61b26f7
@ -2115,6 +2115,11 @@ int av_find_stream_info(AVFormatContext *ic)
|
||||
int64_t last= last_dts[index];
|
||||
int64_t duration= pkt->dts - last;
|
||||
|
||||
if (st->codec->ticks_per_frame == 2 &&
|
||||
st->parser &&
|
||||
st->parser->repeat_pict == 0)
|
||||
duration *= 2; // two fields are needed per frame
|
||||
|
||||
if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && duration>0){
|
||||
double dur= duration * av_q2d(st->time_base);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user