1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

4xm: simplify code with FFSWAP

This commit is contained in:
Anton Khirnov 2012-11-13 21:57:13 +01:00
parent 10c26e928a
commit aa15afb7ce

View File

@ -760,7 +760,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
int buf_size = avpkt->size; int buf_size = avpkt->size;
FourXContext *const f = avctx->priv_data; FourXContext *const f = avctx->priv_data;
AVFrame *picture = data; AVFrame *picture = data;
AVFrame *p, temp; AVFrame *p;
int i, frame_4cc, frame_size, ret; int i, frame_4cc, frame_size, ret;
frame_4cc = AV_RL32(buf); frame_4cc = AV_RL32(buf);
@ -821,9 +821,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
frame_size = buf_size - 12; frame_size = buf_size - 12;
} }
temp = f->current_picture; FFSWAP(AVFrame, f->current_picture, f->last_picture);
f->current_picture = f->last_picture;
f->last_picture = temp;
p = &f->current_picture; p = &f->current_picture;
avctx->coded_frame = p; avctx->coded_frame = p;