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
1 changed files with 1 additions and 7 deletions

View File

@ -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;