]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mlp_parser.c
Fix r21223: AVup samples (issue 1685) need a buf offset like AV1x (issue 1684).
[ffmpeg] / libavcodec / mlp_parser.c
index 34ee193da2fed1abe826a38fb29bf0c73beeeb48..65f5dc51787c56741f1e67209309e3d4c0e890ff 100644 (file)
@@ -27,7 +27,7 @@
 #include <stdint.h>
 
 #include "libavutil/crc.h"
-#include "bitstream.h"
+#include "get_bits.h"
 #include "parser.h"
 #include "mlp_parser.h"
 #include "mlp.h"
@@ -176,7 +176,9 @@ static int mlp_parse(AVCodecParserContext *s,
 
         for (i = 0; i < buf_size; i++) {
             mp->pc.state = (mp->pc.state << 8) | buf[i];
-            if ((mp->pc.state & 0xfffffffe) == 0xf8726fba) {
+            if ((mp->pc.state & 0xfffffffe) == 0xf8726fba &&
+                // ignore if we do not have the data for the start of header
+                mp->pc.index + i >= 7) {
                 mp->in_sync = 1;
                 mp->bytes_left = 0;
                 break;