diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 92710440d8..183b643a01 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3301,7 +3301,8 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, 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;