summaryrefslogtreecommitdiff
path: root/libavcodec/a64multienc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-23 01:58:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-23 02:16:00 +0100
commit29bbc1be488ea4fc591d3e0ef12f0fc7c8812afb (patch)
treea2ffa18542ab61e9b179ebeeffe7a0efed175bac /libavcodec/a64multienc.c
parent4da351ff0cff460db2110cf22f2e3eded8733a58 (diff)
downloadffmpeg-29bbc1be488ea4fc591d3e0ef12f0fc7c8812afb.tar.gz
avcodec/a64multienc: Assert that the Packet size does not grow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/a64multienc.c')
-rw-r--r--libavcodec/a64multienc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index 2643b1a2db..f9c4f36e7d 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"
@@ -385,6 +386,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;