Browse Source

avcodec/zmbv: Update decomp_len in raw frames

decomp_len is used in raw frames, so it should not be left at the value from
whatever was decoded previously (which may be any other frame)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.1
Michael Niedermayer 7 years ago
parent
commit
3d201b83cd
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavcodec/zmbv.c

+ 1
- 0
libavcodec/zmbv.c View File

@@ -525,6 +525,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
memcpy(c->decomp_buf, buf, len); memcpy(c->decomp_buf, buf, len);
c->decomp_len = len;
} else { // ZLIB-compressed data } else { // ZLIB-compressed data
c->zstream.total_in = c->zstream.total_out = 0; c->zstream.total_in = c->zstream.total_out = 0;
c->zstream.next_in = (uint8_t*)buf; c->zstream.next_in = (uint8_t*)buf;


Loading…
Cancel
Save