From: Michael Niedermayer <[email protected]> Add padding, clear size, use the correct pointer.
Signed-off-by: Michael Niedermayer <[email protected]> Signed-off-by: Rémi Denis-Courmont <[email protected]> --- libavcodec/svq1dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 14ff41c..4ea7ed2 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -637,7 +637,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; } -- 2.1.3 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
