Commit 8ef7fb86 authored by Dale Curtis's avatar Dale Curtis Committed by Michael Niedermayer

avformat/utils: Don't calculate duration using AV_NOPTS_VALUE for start_time.

Found by ClusterFuzz, https://crbug.com/879852Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1693a681
......@@ -3869,7 +3869,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
break;
}
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);
} else
st->info->codec_info_duration += pkt->duration;
......
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