]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/parser: assert that there is a past buffer if theres a reference into the...
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 15 Jun 2017 23:35:35 +0000 (01:35 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 15 Jun 2017 23:35:35 +0000 (01:35 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/parser.c

index 30373c762220196aed8dbd51a97a75e9b8b6a289..670680ea7c1d442efe0ccf9f1e674b4a866ac05a 100644 (file)
@@ -285,6 +285,8 @@ int ff_combine_frame(ParseContext *pc, int next,
         return -1;
     }
 
+    av_assert0(next >= 0 || pc->buffer);
+
     *buf_size          =
     pc->overread_index = pc->index + next;