diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index aff2fa2bec..e4db145d94 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3331,7 +3331,8 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, AVBufferRef *buf st = track->stream; if (st->discard >= AVDISCARD_ALL) return res; - av_assert1(block_duration != AV_NOPTS_VALUE); + if (block_duration > INT64_MAX) + block_duration = INT64_MAX; block_time = sign_extend(AV_RB16(data), 16); data += 2;