aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-29 14:03:07 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-29 14:03:52 +0200
commit403940de241e8f15ec9eae3e69c6c2f423bafcf5 (patch)
tree847827c86a0823dea265d1b32d873d5428532c8d
parentf86e7c5d00cc426833c838f6ec6051d411a8bf80 (diff)
downloadffmpeg-403940de241e8f15ec9eae3e69c6c2f423bafcf5.tar.gz
avcodec/mpegvideo: Use FFSWAP to exchange pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index e798565c73..fb8570cc9c 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -846,10 +846,7 @@ static int init_duplicate_context(MpegEncContext *s)
}
if (s->avctx->codec_tag == AV_RL32("VCR2")) {
// exchange uv
- int16_t (*tmp)[64];
- tmp = s->pblocks[4];
- s->pblocks[4] = s->pblocks[5];
- s->pblocks[5] = tmp;
+ FFSWAP(void *, s->pblocks[4], s->pblocks[5]);
}
if (s->out_format == FMT_H263) {
@@ -927,10 +924,7 @@ int ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src)
}
if (dst->avctx->codec_tag == AV_RL32("VCR2")) {
// exchange uv
- int16_t (*tmp)[64];
- tmp = dst->pblocks[4];
- dst->pblocks[4] = dst->pblocks[5];
- dst->pblocks[5] = tmp;
+ FFSWAP(void *, dst->pblocks[4], dst->pblocks[5]);
}
if (!dst->edge_emu_buffer &&
(ret = frame_size_alloc(dst, dst->linesize)) < 0) {