zmbv: remove memcpy() of decoded frame
authorMans Rullgard <mans@mansr.com>
Sun, 9 Oct 2011 12:21:10 +0000 (13:21 +0100)
committerMans Rullgard <mans@mansr.com>
Sun, 9 Oct 2011 12:58:19 +0000 (13:58 +0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/zmbv.c

index 10fd903..a9c127e 100644 (file)
@@ -574,7 +574,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
         default:
             av_log(avctx, AV_LOG_ERROR, "Cannot handle format %i\n", c->fmt);
         }
-        memcpy(c->prev, c->cur, c->width * c->height * (c->bpp / 8));
+        FFSWAP(uint8_t *, c->cur, c->prev);
     }
     *data_size = sizeof(AVFrame);
     *(AVFrame*)data = c->pic;