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:
@@ -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;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user