Commit 19d89549 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent db0a0aa2
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment