diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-05-31 14:14:27 +0400 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-05-31 14:14:27 +0400 |
commit | 661cb0d4a9c467ccbbc6aa6b628b8461db9ecc05 (patch) | |
tree | 14ad94bcf261c4ea054a67fcd5a066a4d22c139e /libavcodec/lcldec.c | |
parent | ce22c7d075718bcbce59732279bbd03f99ca77b1 (diff) |
Fix decoding of multithread-encoded lcl files on big-endian.
Originally committed as revision 19045 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lcldec.c')
-rw-r--r-- | libavcodec/lcldec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index 51ce044add..01b4b43202 100644 --- a/libavcodec/lcldec.c +++ b/libavcodec/lcldec.c @@ -189,9 +189,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac switch (c->compression) { case COMP_MSZH: if (c->flags & FLAG_MULTITHREAD) { - mthread_inlen = *(unsigned int*)encoded; + mthread_inlen = AV_RL32(encoded); mthread_inlen = FFMIN(mthread_inlen, len - 8); - mthread_outlen = *(unsigned int*)(encoded+4); + mthread_outlen = AV_RL32(encoded+4); mthread_outlen = FFMIN(mthread_outlen, c->decomp_size); mszh_dlen = mszh_decomp(encoded + 8, mthread_inlen, c->decomp_buf, c->decomp_size); if (mthread_outlen != mszh_dlen) { @@ -236,9 +236,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac break; if (c->flags & FLAG_MULTITHREAD) { int ret; - mthread_inlen = *(unsigned int*)encoded; + mthread_inlen = AV_RL32(encoded); mthread_inlen = FFMIN(mthread_inlen, len - 8); - mthread_outlen = *(unsigned int*)(encoded+4); + mthread_outlen = AV_RL32(encoded+4); mthread_outlen = FFMIN(mthread_outlen, c->decomp_size); ret = zlib_decomp(avctx, encoded + 8, mthread_inlen, 0, mthread_outlen); if (ret < 0) return ret; |