Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-07 04:27:07 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-08-08 17:49:50 +0400
commit09e3fe79fc09459e62db73350909bda138792019 (patch)
tree87110e96a6ac6c0f6f95de61fef7ba2ed627c95f
parente4b1cffadef2396746f29ed30fe340b33ab9fa82 (diff)
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> (cherry picked from commit 4213fc5b9eebec53c7d22b770c3f1ceecca1c113) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/svq1dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 9aac8c74c4..d5f7581264 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -639,7 +639,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);
@@ -826,6 +826,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx)
avcodec_free_frame(&s->cur);
avcodec_free_frame(&s->prev);
av_freep(&s->pkt_swapped);
+ s->pkt_swapped_allocated = 0;
return 0;
}