Skip to content
This repository has been archived by the owner on Apr 9, 2018. It is now read-only.

Commit

Permalink
prores: only call get_buffer once per frame
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
michaelni committed Oct 9, 2011
1 parent ebba05b commit e1b2f6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions libavcodec/proresdec_gpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,19 +575,19 @@ 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) {
av_log(avctx, AV_LOG_ERROR, "error decoding picture header\n");
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;
Expand Down

0 comments on commit e1b2f6e

Please sign in to comment.