Commit 266f6eef authored by Reimar Döffinger's avatar Reimar Döffinger

nuv: do not use data not initialized by LZO decompression.

This fixes visible corruption in the incomplete last frame
of the FATE sample.
Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 95e1dfee
...@@ -187,7 +187,7 @@ retry: ...@@ -187,7 +187,7 @@ retry:
if (av_lzo1x_decode(c->decomp_buf, &outlen, buf, &inlen)) if (av_lzo1x_decode(c->decomp_buf, &outlen, buf, &inlen))
av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n"); av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
buf = c->decomp_buf; buf = c->decomp_buf;
buf_size = c->decomp_size - AV_LZO_OUTPUT_PADDING; buf_size = c->decomp_size - AV_LZO_OUTPUT_PADDING - outlen;
} }
if (c->codec_frameheader) { if (c->codec_frameheader) {
int w, h, q, res; int w, h, q, res;
......
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
1, 29257, 4096, 0xd95a9277 1, 29257, 4096, 0xd95a9277
0, 30030, 460800, 0x4b7f4df0 0, 30030, 460800, 0x4b7f4df0
1, 31347, 4096, 0xae2bef2c 1, 31347, 4096, 0xae2bef2c
0, 33033, 460800, 0xb30eb322 0, 33033, 460800, 0xa57f20d0
1, 33437, 4096, 0xbf031e83 1, 33437, 4096, 0xbf031e83
1, 35527, 4096, 0x4c83e2d1 1, 35527, 4096, 0x4c83e2d1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment