mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
lavf: handle data like subtitles in start time calculation.
This fixes an issue with a crazy data track starting with a large negative timestamp. It could as well be solved in all user apps, but this is looking attractively simpler ... Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
728f86edfc
commit
47695b1d65
@ -2045,7 +2045,7 @@ static void update_stream_timings(AVFormatContext *ic)
|
|||||||
st = ic->streams[i];
|
st = ic->streams[i];
|
||||||
if (st->start_time != AV_NOPTS_VALUE && st->time_base.den) {
|
if (st->start_time != AV_NOPTS_VALUE && st->time_base.den) {
|
||||||
start_time1= av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q);
|
start_time1= av_rescale_q(st->start_time, st->time_base, AV_TIME_BASE_Q);
|
||||||
if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE || st->codec->codec_type == AVMEDIA_TYPE_DATA) {
|
||||||
if (start_time1 < start_time_text)
|
if (start_time1 < start_time_text)
|
||||||
start_time_text = start_time1;
|
start_time_text = start_time1;
|
||||||
} else
|
} else
|
||||||
|
Loading…
Reference in New Issue
Block a user