Commit 2786ac77 authored by Paul B Mahol's avatar Paul B Mahol

zmbv: use av_image_copy_plane()

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 994e0934
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment