summaryrefslogtreecommitdiff
path: root/libavcodec/indeo3.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r--libavcodec/indeo3.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 133b9513cb..327b24d0da 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -1056,6 +1056,9 @@ static int indeo3_decode_frame(AVCodecContext *avctx,
iv_decode_frame(s, buf, buf_size);
+ if(s->frame.data[0])
+ avctx->release_buffer(avctx, &s->frame);
+
s->frame.reference = 0;
if(avctx->get_buffer(avctx, &s->frame) < 0) {
fprintf(stderr, "get_buffer() failed\n");
@@ -1089,8 +1092,6 @@ static int indeo3_decode_frame(AVCodecContext *avctx,
*data_size=sizeof(AVFrame);
*(AVFrame*)data= s->frame;
- avctx->release_buffer(avctx, &s->frame);
-
return buf_size;
}