diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-30 23:41:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-30 23:48:54 +0200 |
commit | 19d89549667acbb0b7892d9583d08597f66be838 (patch) | |
tree | 080c1ac85c6f8e4cfa83d4ad11312bf07cac927b | |
parent | db0a0aa243d47ee471ad472b5b15b33b11e30405 (diff) | |
download | ffmpeg-19d89549667acbb0b7892d9583d08597f66be838.tar.gz |
find_stream_info: update last_dts more often
This improves dts validity checks and consequently fps detection of files with invalid dts
Fixes Ticket1681
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 301528d99e..4ce0a0c4e7 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2721,7 +2721,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) if (st->info->duration_count > 3) st->info->duration_gcd = av_gcd(st->info->duration_gcd, duration); } - if (last == AV_NOPTS_VALUE || st->info->duration_count <= 1) + if (pkt->dts != AV_NOPTS_VALUE) st->info->last_dts = pkt->dts; } #endif |