aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-07 02:27:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-07 02:27:07 +0200
commit4213fc5b9eebec53c7d22b770c3f1ceecca1c113 (patch)
treeb02f4c6ddbd1da978dcdd46e32f88ed8f8eb93b6 /libavcodec
parente55e09949e59163bed71b6e9e9ee4098186a1f21 (diff)
downloadffmpeg-4213fc5b9eebec53c7d22b770c3f1ceecca1c113.tar.gz
avcodec/svq1dec: Fix multiple bugs from "svq1: do not modify the input packet"
Add padding, clear size, use the correct pointer. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/svq1dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index cab9bac901..eb643446d1 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -635,7 +635,7 @@ static int svq1_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
- av_fast_malloc(s->pkt_swapped, &s->pkt_swapped_allocated,
+ av_fast_padded_malloc(&s->pkt_swapped, &s->pkt_swapped_allocated,
buf_size);
if (!s->pkt_swapped)
return AVERROR(ENOMEM);
@@ -818,6 +818,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx)
av_frame_free(&s->prev);
av_freep(&s->pkt_swapped);
+ s->pkt_swapped_allocated = 0;
return 0;
}