[FFmpeg-cvslog] svq1dec: Unbreak the scratch buffer allocation

Michael Niedermayer git at videolan.org
Sun Jan 18 00:23:34 CET 2015


ffmpeg | branch: release/2.4 | Michael Niedermayer <michaelni at gmx.at> | Sat Dec  6 11:40:30 2014 +0100| [1fd55ec507f6f47b4d9fddf8e79a0df4540ef6e4] | committer: Luca Barbato

svq1dec: Unbreak the scratch buffer allocation

The input packets are always assumed to be padded and
the av_fast_ family of function takes a pointer to a pointer.

Thanks to Nicolas Dufresne <nicolas.dufresne at collabora.com> for
a similar patch.

Introduced in 7b588bb691644e1b3c168b99accf74248a24e3cf.

Bug-Id: 766
CC: libav-stable at libav.org
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 libavcodec/svq1dec.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 14ff41c..789a013 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -637,8 +637,9 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data,
             return AVERROR_INVALIDDATA;
         }
 
-        av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated,
-                       buf_size);
+        av_fast_padded_malloc(&s->pkt_swapped,
+                              &s->pkt_swapped_allocated,
+                              buf_size);
         if (!s->pkt_swapped)
             return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list