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>
This commit is contained in:
Andreas Rheinhardt
2021-03-22 02:40:20 +01:00
parent efbfee4c1a
commit 7439267eeb

View File

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