summaryrefslogtreecommitdiff
path: root/libavcodec/indeo3.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-11-02 23:39:03 +0000
committerPaul B Mahol <onemda@gmail.com>2012-11-02 23:43:23 +0000
commit20ac916e6d94cc9df95ca76cabf99c25776dbe41 (patch)
tree854fdac41a8a773f9fe3949e674b62fe3ec517c9 /libavcodec/indeo3.c
parentb02116cc4a3ac7e9726df75937560c460ca096df (diff)
indeo3: release buffer before calling decode_plane
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r--libavcodec/indeo3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index bd2bc3b11d..1f341e379e 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -1084,6 +1084,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
/* use BS_BUFFER flag for buffer switching */
ctx->buf_sel = (ctx->frame_flags >> BS_BUFFER) & 1;
+ if (ctx->frame.data[0])
+ avctx->release_buffer(avctx, &ctx->frame);
+
/* decode luma plane */
if ((res = decode_plane(ctx, avctx, ctx->planes, ctx->y_data_ptr, ctx->y_data_size, 40)))
return res;
@@ -1095,9 +1098,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if ((res = decode_plane(ctx, avctx, &ctx->planes[2], ctx->v_data_ptr, ctx->v_data_size, 10)))
return res;
- if (ctx->frame.data[0])
- avctx->release_buffer(avctx, &ctx->frame);
-
ctx->frame.reference = 0;
if ((res = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
av_log(ctx->avctx, AV_LOG_ERROR, "get_buffer() failed\n");