diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 9e27a2caad04581c284da32afa70f67a0647089a..177993d0a6b7b78cfee8384eb4a72a51c3334fe7 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -525,6 +525,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
             return AVERROR_INVALIDDATA;
         }
         memcpy(c->decomp_buf, buf, len);
+        c->decomp_len = len;
     } else { // ZLIB-compressed data
         c->zstream.total_in = c->zstream.total_out = 0;
         c->zstream.next_in = (uint8_t*)buf;