]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/gdv: Replace loop in gdv_decode_frame() by memcpy()
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 5 Aug 2018 15:10:22 +0000 (17:10 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 27 Sep 2018 23:25:17 +0000 (01:25 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/gdv.c

index aea15a88ef0131e10471ca19477e2ba0c212a51c..1623febd1a98a750495ce9ddcf531ebbc19204bf 100644 (file)
@@ -479,9 +479,7 @@ static int gdv_decode_frame(AVCodecContext *avctx, void *data,
 
         for (y = 0; y < avctx->height; y++) {
             if (!gdv->scale_v) {
-                for (x = 0; x < avctx->width; x++) {
-                    dst[didx + x] = gdv->frame[sidx + x];
-                }
+                memcpy(dst + didx, gdv->frame + sidx, avctx->width);
             } else {
                 for (x = 0; x < avctx->width; x++) {
                     dst[didx + x] = gdv->frame[sidx + x/2];