aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-23 01:58:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-29 03:34:21 +0200
commit9dc686815554d98e9c1070183187d0df8337fa0e (patch)
treea22b7c1256675795a6231c7408f96696f10030ea
parent35a79bdf7df718de107d75b73c7c588d2e9647fe (diff)
downloadffmpeg-9dc686815554d98e9c1070183187d0df8337fa0e.tar.gz
avcodec/a64multienc: Assert that the Packet size does not grow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 29bbc1be488ea4fc591d3e0ef12f0fc7c8812afb) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/a64multienc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index 34e5b2dc99..0d926672f6 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -28,6 +28,7 @@
#include "a64tables.h"
#include "elbg.h"
#include "internal.h"
+#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
@@ -379,6 +380,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
pkt->pts = pkt->dts = c->next_pts;
c->next_pts = AV_NOPTS_VALUE;
+ av_assert0(pkt->size >= req_size);
pkt->size = req_size;
pkt->flags |= AV_PKT_FLAG_KEY;
*got_packet = !!req_size;