summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index b56190d2da..a322137fcf 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3813,7 +3813,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
av_packet_unref(pkt1);
break;
}
- if (pkt->duration) {
+ if (pkt->duration > 0) {
if (avctx->codec_type == AVMEDIA_TYPE_SUBTITLE && pkt->pts != AV_NOPTS_VALUE && st->start_time != AV_NOPTS_VALUE && pkt->pts >= st->start_time
&& (uint64_t)pkt->pts - st->start_time < INT64_MAX
) {