dpx: use av_image_copy_plane()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2013-07-27 20:51:14 +00:00
parent 6a57494204
commit 94ad38e2e8
1 changed files with 3 additions and 5 deletions

View File

@ -244,11 +244,9 @@ static int decode_frame(AVCodecContext *avctx,
case 16:
elements *= 2;
case 8:
for (x = 0; x < avctx->height; x++) {
memcpy(ptr[0], buf, elements*avctx->width);
ptr[0] += p->linesize[0];
buf += elements*avctx->width;
}
av_image_copy_plane(ptr[0], p->linesize[0],
buf, elements * avctx->width,
elements * avctx->width, avctx->height);
break;
}