aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-11-04 14:34:02 +0000
committerPaul B Mahol <onemda@gmail.com>2012-11-04 14:42:32 +0000
commitb0428741c633c4ec1ae967111597dcfbf7799528 (patch)
treead35fe79cfc5f444509d36b2be9725d716979af7
parenta04698c4a9b66a933505724cc95112202f1ee794 (diff)
downloadffmpeg-b0428741c633c4ec1ae967111597dcfbf7799528.tar.gz
indeo3: move get_buffer() above decode_plane() calls
This ensure that decode_plane() mmx code like AV_COPY64() does not interfere with possible float instructions in release_buffer/get_buffer. Found-by: Carl Eugen Hoyos Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r--libavcodec/indeo3.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 1f341e379e..013d6107cf 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -1087,6 +1087,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
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");
+ return res;
+ }
+
/* decode luma plane */
if ((res = decode_plane(ctx, avctx, ctx->planes, ctx->y_data_ptr, ctx->y_data_size, 40)))
return res;
@@ -1098,12 +1104,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;
- ctx->frame.reference = 0;
- if ((res = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
- av_log(ctx->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
- return res;
- }
-
output_plane(&ctx->planes[0], ctx->buf_sel,
ctx->frame.data[0], ctx->frame.linesize[0],
avctx->height);