summaryrefslogtreecommitdiff
path: root/libavcodec/svq1dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-06 11:40:30 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-12-14 22:03:58 +0100
commit5a82ad644f281701eb22e0359fd732fac67aafa4 (patch)
tree98a9631877b99cbbe8e70c214d3eb4363b6aa422 /libavcodec/svq1dec.c
parentbcbdeb318e0828cf00b458885ffa1e1596c85d06 (diff)
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@collabora.com> for a similar patch. Introduced in 7b588bb691644e1b3c168b99accf74248a24e3cf. Bug-Id: 766 CC: libav-stable@libav.org Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/svq1dec.c')
-rw-r--r--libavcodec/svq1dec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 14ff41cc18..789a0132fb 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);