]> git.sesse.net Git - ffmpeg/commitdiff
mlp_parser: print error when ff_combine_frame() fails to add the current buffer
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Oct 2012 22:05:03 +0000 (00:05 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 18 Oct 2012 22:05:03 +0000 (00:05 +0200)
Fixes part of CID602338
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mlp_parser.c

index 5fb1424b468cc02895a58213854412f18e8870a9..1f5a3b13ab3fb67031a2584e1bb45a9f3f7442c9 100644 (file)
@@ -239,7 +239,8 @@ static int mlp_parse(AVCodecParserContext *s,
         }
 
         if (!mp->in_sync) {
-            ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size);
+            if (ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size) != -1)
+                av_log(avctx, AV_LOG_WARNING, "ff_combine_frame failed\n");
             return buf_size;
         }
 
@@ -257,7 +258,8 @@ static int mlp_parse(AVCodecParserContext *s,
         }
 
         if (mp->pc.index + buf_size < 2) {
-            ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size);
+            if (ff_combine_frame(&mp->pc, END_NOT_FOUND, &buf, &buf_size) != -1)
+                av_log(avctx, AV_LOG_WARNING, "ff_combine_frame failed\n");
             return buf_size;
         }