mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
efbfee4c1a
commit
7439267eeb
|
@ -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…
Reference in New Issue