X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmatroskadec.c;h=68c936c15a1ee0ac2a99602d6f9ddf8284c38d7c;hb=31c54711cc3f1484af101d629bbb805820d37ad1;hp=0a35a875c1a59f149aeb03262e78eeee23c2850f;hpb=7d8431004a236c7f3ea600753989fad11fd2d6df;p=ffmpeg diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 0a35a875c1a..68c936c15a1 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -35,7 +35,7 @@ /* For ff_codec_get_id(). */ #include "riff.h" #include "isom.h" -#include "rm.h" +#include "rmsipr.h" #include "matroska.h" #include "libavcodec/bytestream.h" #include "libavcodec/mpeg4audio.h" @@ -1804,7 +1804,7 @@ static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf, } case 0x2: /* fixed-size lacing */ - if (size != (size / *laces) * size) { + if (size % (*laces)) { res = AVERROR_INVALIDDATA; break; } @@ -2195,7 +2195,7 @@ static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt) ret = matroska_parse_cluster(matroska); } - if (ret == AVERROR_INVALIDDATA) { + if (ret == AVERROR_INVALIDDATA && pkt->data) { pkt->flags |= AV_PKT_FLAG_CORRUPT; return 0; }