avcodec/kmvc: Avoid branch when swapping pointers

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
pull/362/head
Andreas Rheinhardt 4 years ago
parent efbfee4c1a
commit 7439267eeb
  1. 8
      libavcodec/kmvc.c

@ -345,13 +345,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame,
}
/* flip buffers */
if (ctx->cur == ctx->frm0) {
ctx->cur = ctx->frm1;
ctx->prev = ctx->frm0;
} else {
ctx->cur = ctx->frm0;
ctx->prev = ctx->frm1;
}
FFSWAP(uint8_t *, ctx->cur, ctx->prev);
*got_frame = 1;

Loading…
Cancel
Save