diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-12 19:07:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-12 19:19:00 +0200 |
commit | 47695b1d65de52eed7cbceeaa0985fa36d8bc264 (patch) | |
tree | e1c6d7e87ff6ad50e91cba072f72e5a0b2496f83 | |
parent | 728f86edfc03dd5005abdd8fbb9164a599698875 (diff) | |
download | ffmpeg-47695b1d65de52eed7cbceeaa0985fa36d8bc264.tar.gz |
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>
-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 88c7444387..8d33f8dbf8 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2045,7 +2045,7 @@ static void update_stream_timings(AVFormatContext *ic) st = ic->streams[i]; 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); - 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) start_time_text = start_time1; } else |