mirror of https://git.ffmpeg.org/ffmpeg.git
Merge remote-tracking branch 'stev47/master'
* stev47/master: cpia: move reget_buffer after header check Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
75a4b91f83
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue