|
|
@@ -435,13 +435,13 @@ static int decode_zbuf(AVBPrint *bp, const uint8_t *data, |
|
|
av_bprint_init(bp, 0, -1); |
|
|
av_bprint_init(bp, 0, -1); |
|
|
|
|
|
|
|
|
while (zstream.avail_in > 0) { |
|
|
while (zstream.avail_in > 0) { |
|
|
av_bprint_get_buffer(bp, 1, &buf, &buf_size); |
|
|
|
|
|
if (!buf_size) { |
|
|
|
|
|
|
|
|
av_bprint_get_buffer(bp, 2, &buf, &buf_size); |
|
|
|
|
|
if (buf_size < 2) { |
|
|
ret = AVERROR(ENOMEM); |
|
|
ret = AVERROR(ENOMEM); |
|
|
goto fail; |
|
|
goto fail; |
|
|
} |
|
|
} |
|
|
zstream.next_out = buf; |
|
|
zstream.next_out = buf; |
|
|
zstream.avail_out = buf_size; |
|
|
|
|
|
|
|
|
zstream.avail_out = buf_size - 1; |
|
|
ret = inflate(&zstream, Z_PARTIAL_FLUSH); |
|
|
ret = inflate(&zstream, Z_PARTIAL_FLUSH); |
|
|
if (ret != Z_OK && ret != Z_STREAM_END) { |
|
|
if (ret != Z_OK && ret != Z_STREAM_END) { |
|
|
ret = AVERROR_EXTERNAL; |
|
|
ret = AVERROR_EXTERNAL; |
|
|
|