[FFmpeg-cvslog] avcodec/a64multienc: Assert that the Packet size does not grow

Michael Niedermayer git at videolan.org
Mon Feb 23 02:26:48 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Feb 23 01:58:11 2015 +0100| [29bbc1be488ea4fc591d3e0ef12f0fc7c8812afb] | committer: Michael Niedermayer

avcodec/a64multienc: Assert that the Packet size does not grow

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=29bbc1be488ea4fc591d3e0ef12f0fc7c8812afb
---

 libavcodec/a64multienc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index 2643b1a..f9c4f36 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;



More information about the ffmpeg-cvslog mailing list