]> git.sesse.net Git - ffmpeg/commitdiff
Revert "avcodec/wcmv: Avoid copying frames if they are unchanged"
authorJames Almer <jamrial@gmail.com>
Wed, 4 Sep 2019 02:49:00 +0000 (23:49 -0300)
committerJames Almer <jamrial@gmail.com>
Wed, 4 Sep 2019 13:07:12 +0000 (10:07 -0300)
This reverts commit 976dae8b32f48d17cccfd6b19d2beb01770dfa7c.

An alternative approach to reduce frame copying will follow.

libavcodec/wcmv.c

index 123b29ad4b8e69c13bdd1083973d55a99aa3e6ed..2f21c1430cdd04a83367fb514251ad2caca435ed 100644 (file)
@@ -56,13 +56,11 @@ static int decode_frame(AVCodecContext *avctx,
     }
 
     bytestream2_init(&gb, avpkt->data, avpkt->size);
-    blocks = bytestream2_get_le16(&gb);
-    if (!blocks)
-        return avpkt->size;
 
     if ((ret = ff_reget_buffer(avctx, s->prev_frame, 0)) < 0)
         return ret;
 
+    blocks = bytestream2_get_le16(&gb);
     if (blocks > 5) {
         GetByteContext bgb;
         int x = 0, size;