mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01:00
avformat/utils: Don't calculate duration using AV_NOPTS_VALUE for start_time.
Found by ClusterFuzz, https://crbug.com/879852 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
1693a68187
commit
8ef7fb86d6
@@ -3869,7 +3869,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (pkt->duration) {
|
if (pkt->duration) {
|
||||||
if (avctx->codec_type == AVMEDIA_TYPE_SUBTITLE && pkt->pts != AV_NOPTS_VALUE && pkt->pts >= st->start_time) {
|
if (avctx->codec_type == AVMEDIA_TYPE_SUBTITLE && pkt->pts != AV_NOPTS_VALUE && st->start_time != AV_NOPTS_VALUE && pkt->pts >= st->start_time) {
|
||||||
st->info->codec_info_duration = FFMIN(pkt->pts - st->start_time, st->info->codec_info_duration + pkt->duration);
|
st->info->codec_info_duration = FFMIN(pkt->pts - st->start_time, st->info->codec_info_duration + pkt->duration);
|
||||||
} else
|
} else
|
||||||
st->info->codec_info_duration += pkt->duration;
|
st->info->codec_info_duration += pkt->duration;
|
||||||
|
|||||||
Reference in New Issue
Block a user