rmdec: Honor .RMF tag size rather than assuming 18.
authorAlex Converse <alex.converse@gmail.com>
Fri, 2 Mar 2012 00:47:54 +0000 (16:47 -0800)
committerAlex Converse <alex.converse@gmail.com>
Fri, 2 Mar 2012 17:31:32 +0000 (09:31 -0800)
libavformat/rmdec.c

index a5e6d2d..ae6cd0b 100644 (file)
@@ -438,10 +438,8 @@ static int rm_read_header(AVFormatContext *s)
         return AVERROR(EIO);
     }
 
-    avio_rb32(pb); /* header size */
-    avio_rb16(pb);
-    avio_rb32(pb);
-    avio_rb32(pb); /* number of headers */
+    tag_size = avio_rb32(pb);
+    avio_skip(pb, tag_size - 8);
 
     for(;;) {
         if (pb->eof_reached)