summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-01 09:59:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-01 10:00:08 +0200
commit52fa2945b594d02c84b817aaa3d01041eb2c1cf7 (patch)
tree84114d9649ffe16a9ab2e32bbad848172dad68d7 /libavcodec/utils.c
parentd8b6557c866d268745123cbdd6e5431ed9261b96 (diff)
parente036bb7899d0faca9159206be9bf5552e76e7633 (diff)
Merge commit 'e036bb7899d0faca9159206be9bf5552e76e7633'
* commit 'e036bb7899d0faca9159206be9bf5552e76e7633': lavc: clear AVBuffers on decoded frames if refcounted_frames is not set FATE: add an additional indeo3 test Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 245ae89fa5..5d139354b0 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1963,6 +1963,7 @@ int attribute_align_arg avcodec_decode_video2(AVCodecContext *avctx, AVFrame *pi
if (!avctx->refcounted_frames) {
avci->to_free = *picture;
avci->to_free.extended_data = avci->to_free.data;
+ memset(picture->buf, 0, sizeof(picture->buf));
}
avctx->frame_number++;
@@ -2084,6 +2085,9 @@ int attribute_align_arg avcodec_decode_audio4(AVCodecContext *avctx,
if (!avctx->refcounted_frames) {
avci->to_free = *frame;
avci->to_free.extended_data = avci->to_free.data;
+ memset(frame->buf, 0, sizeof(frame->buf));
+ frame->extended_buf = NULL;
+ frame->nb_extended_buf = 0;
}
}