]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mlp_parser.c
Reindent
[ffmpeg] / libavcodec / mlp_parser.c
index 42295cc352fe66e98ac37041bf9fa8d6d15499f1..90bf9391e940443b8777e793524905833812dc19 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file libavcodec/mlp_parser.c
+ * @file
  * MLP parser
  */
 
@@ -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;
@@ -291,5 +293,5 @@ AVCodecParser mlp_parser = {
     sizeof(MLPParseContext),
     mlp_init,
     mlp_parse,
-    NULL,
+    ff_parse_close,
 };