summaryrefslogtreecommitdiff
path: root/libavcodec/zmbv.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-07-29 09:59:03 +0000
committerPaul B Mahol <onemda@gmail.com>2013-07-29 14:45:02 +0000
commit2786ac777d2c50320e3b939a9bfeaf9fb5ce53a8 (patch)
tree239ca5e318187303b1dbf21c094dccf72de31a1a /libavcodec/zmbv.c
parent994e09345ef9547be89e99ded3c3f68cd3cf81dd (diff)
zmbv: use av_image_copy_plane()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/zmbv.c')
-rw-r--r--libavcodec/zmbv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 215e87ae63..905c4ccbe6 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include "libavutil/common.h"
+#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "internal.h"
@@ -554,11 +555,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
case ZMBV_FMT_24BPP:
#endif
case ZMBV_FMT_32BPP:
- for (j = 0; j < c->height; j++) {
- memcpy(out, src, c->stride);
- src += c->stride;
- out += frame->linesize[0];
- }
+ av_image_copy_plane(out, frame->linesize[0], src, c->stride,
+ c->stride, c->height);
break;
default:
av_log(avctx, AV_LOG_ERROR, "Cannot handle format %i\n", c->fmt);