aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-09 21:51:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-09 21:52:16 +0200
commite1b2f6ec119dc43a66ff731b98c768778497ff95 (patch)
tree72573d823d18be977d0eaf40944990835c41e451
parentebba05b3c51cffbfe2f758dd6bc70c4f14906dfe (diff)
downloadffmpeg-e1b2f6ec119dc43a66ff731b98c768778497ff95.tar.gz
prores: only call get_buffer once per frame
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/proresdec_gpl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/proresdec_gpl.c b/libavcodec/proresdec_gpl.c
index 9fbb8ee5ce..a375f9c957 100644
--- a/libavcodec/proresdec_gpl.c
+++ b/libavcodec/proresdec_gpl.c
@@ -575,6 +575,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
buf += frame_hdr_size;
buf_size -= frame_hdr_size;
+ if (frame->data[0])
+ avctx->release_buffer(avctx, frame);
+
+ if (avctx->get_buffer(avctx, frame) < 0)
+ return -1;
+
decode_picture:
pic_size = decode_picture_header(avctx, buf, buf_size);
if (pic_size < 0) {
@@ -582,12 +588,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return -1;
}
- if (frame->data[0])
- avctx->release_buffer(avctx, frame);
-
- if (avctx->get_buffer(avctx, frame) < 0)
- return -1;
-
if (decode_picture(avctx)) {
av_log(avctx, AV_LOG_ERROR, "error decoding picture\n");
return -1;