summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-16 01:35:35 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-16 01:35:35 +0200
commitc0607d88ee1fbd5a5272abe415ee83cc10310021 (patch)
tree5b436f0487e5aba8d272d3400fd933c63d1a5aa0
parent3c716682a8b69e6644a385a663aaf0e5dc808ae8 (diff)
avcodec/parser: assert that there is a past buffer if theres a reference into the past
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 30373c7622..670680ea7c 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -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;