summaryrefslogtreecommitdiff
path: root/libavcodec/wcmv.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-09-03 23:49:00 -0300
committerJames Almer <jamrial@gmail.com>2019-09-04 10:07:12 -0300
commit5102999223f2614cf06a8fc801a3f0dd8b0c4ea3 (patch)
treeec23a21d8af25d03fdfe04c368c4aabaa18e6314 /libavcodec/wcmv.c
parentc14a12ac84a8e7f6c142569dcab7d5b728a970a1 (diff)
Revert "avcodec/wcmv: Avoid copying frames if they are unchanged"
This reverts commit 976dae8b32f48d17cccfd6b19d2beb01770dfa7c. An alternative approach to reduce frame copying will follow.
Diffstat (limited to 'libavcodec/wcmv.c')
-rw-r--r--libavcodec/wcmv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/wcmv.c b/libavcodec/wcmv.c
index 123b29ad4b..2f21c1430c 100644
--- a/libavcodec/wcmv.c
+++ b/libavcodec/wcmv.c
@@ -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;