Permalink
Browse files

4xm: simplify code with FFSWAP

  • Loading branch information...
1 parent 10c26e9 commit aa15afb7ce850e2ac688efdef189df5da817a646 @elenril elenril committed Nov 13, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 libavcodec/4xm.c
View
@@ -760,7 +760,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
int buf_size = avpkt->size;
FourXContext *const f = avctx->priv_data;
AVFrame *picture = data;
- AVFrame *p, temp;
+ AVFrame *p;
int i, frame_4cc, frame_size, ret;
frame_4cc = AV_RL32(buf);
@@ -821,9 +821,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
frame_size = buf_size - 12;
}
- temp = f->current_picture;
- f->current_picture = f->last_picture;
- f->last_picture = temp;
+ FFSWAP(AVFrame, f->current_picture, f->last_picture);
p = &f->current_picture;
avctx->coded_frame = p;

0 comments on commit aa15afb

Please sign in to comment.