diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-09-01 14:22:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-01 14:23:05 +0200 |
commit | 75a4b91f8354fbae24a38b94b26ddac6a114014e (patch) | |
tree | f4905ecdf726c8f40a2e4106f50e85726689588d | |
parent | 899101d3d39d8165aa3c767efdb1d9c8a010d16d (diff) | |
parent | e30967710028950426c1c02f86a3bdaf463e5dce (diff) | |
download | ffmpeg-75a4b91f8354fbae24a38b94b26ddac6a114014e.tar.gz |
Merge remote-tracking branch 'stev47/master'
* stev47/master:
cpia: move reget_buffer after header check
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/cpia.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/cpia.c b/libavcodec/cpia.c index c45936b65f..a631a05108 100644 --- a/libavcodec/cpia.c +++ b/libavcodec/cpia.c @@ -61,12 +61,6 @@ static int cpia_decode_frame(AVCodecContext* avctx, AVFrame* const frame = &cpia->frame; uint8_t *y, *u, *v, *y_end, *u_end, *v_end; - // Get buffer filled with previous frame - if ((ret = avctx->reget_buffer(avctx, frame)) < 0) { - av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed!\n"); - return ret; - } - // Check header if ( avpkt->size < FRAME_HEADER_SIZE || header[0] != MAGIC_0 || header[1] != MAGIC_1 @@ -104,6 +98,12 @@ static int cpia_decode_frame(AVCodecContext* avctx, frame->key_frame = 0; } + // Get buffer filled with previous frame + if ((ret = avctx->reget_buffer(avctx, frame)) < 0) { + av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed!\n"); + return ret; + } + for ( i = 0; i < frame->height; |