aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/lcldec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-05-31 10:01:26 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2009-05-31 10:01:26 +0000
commit21bf2f51d702dc80891004b7ce0f279aeed3787a (patch)
treea686c685dd3007c208d47ecd10d6f83e39d68b72 /libavcodec/lcldec.c
parent46adcc27a218d381fa23ea247f1dd4bc6a60e885 (diff)
downloadffmpeg-21bf2f51d702dc80891004b7ce0f279aeed3787a.tar.gz
Correct calculation of compressed input length.
Originally committed as revision 19043 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r--libavcodec/lcldec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 5593567500..ab8dd870ed 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -199,7 +199,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
mthread_outlen, mszh_dlen);
return -1;
}
- mszh_dlen = mszh_decomp(encoded + 8 + mthread_inlen, len - mthread_inlen,
+ mszh_dlen = mszh_decomp(encoded + 8 + mthread_inlen, len - 8 - mthread_inlen,
c->decomp_buf + mthread_outlen, c->decomp_size - mthread_outlen);
if (mthread_outlen != mszh_dlen) {
av_log(avctx, AV_LOG_ERROR, "Mthread2 decoded size differs (%d != %d)\n",
@@ -242,7 +242,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
mthread_outlen = FFMIN(mthread_outlen, c->decomp_size);
ret = zlib_decomp(avctx, encoded + 8, mthread_inlen, 0, mthread_outlen);
if (ret < 0) return ret;
- ret = zlib_decomp(avctx, encoded + 8 + mthread_inlen, len - mthread_inlen,
+ ret = zlib_decomp(avctx, encoded + 8 + mthread_inlen, len - 8 - mthread_inlen,
mthread_outlen, mthread_outlen);
if (ret < 0) return ret;
} else {