dpx: use av_image_copy_plane()
authorPaul B Mahol <onemda@gmail.com>
Sat, 27 Jul 2013 20:51:14 +0000 (20:51 +0000)
committerPaul B Mahol <onemda@gmail.com>
Sat, 27 Jul 2013 20:51:14 +0000 (20:51 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/dpx.c

index 2fd5bdc..a910eac 100644 (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;
     }