diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c index 3b0460fd79..4482a0e070 100644 --- a/libavcodec/escape130.c +++ b/libavcodec/escape130.c @@ -212,9 +212,6 @@ static int escape130_decode_frame(AVCodecContext *avctx, AVFrame *pic, return AVERROR_INVALIDDATA; } - if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) - return ret; - if ((ret = init_get_bits8(&gb, avpkt->data, avpkt->size)) < 0) return ret; skip_bits_long(&gb, 16 * 8); @@ -310,6 +307,9 @@ static int escape130_decode_frame(AVCodecContext *avctx, AVFrame *pic, skip--; } + if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) + return ret; + new_y = s->new_y; new_cb = s->new_u; new_cr = s->new_v;