diff options
author | Dale Curtis <dalecurtis@chromium.org> | 2018-09-07 15:37:09 -0700 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-09-09 12:01:07 +0200 |
commit | 8ef7fb86d62c9d44697c8eef0ddc424be4a3612b (patch) | |
tree | 16362da5d1d2a0cc59e60cbd697742d1f4341a98 | |
parent | 1693a6818730760b3f2e9fbc13354dcb6c31c86f (diff) |
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>
-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 b0b5e164a6..a72f0a482e 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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; |