]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/matroskadec.c
lavf: split wav muxer and demuxer into separate files.
[ffmpeg] / libavformat / matroskadec.c
index 0a35a875c1a59f149aeb03262e78eeee23c2850f..68c936c15a1ee0ac2a99602d6f9ddf8284c38d7c 100644 (file)
@@ -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;
     }