changeset 9761:b69de727fd7c libavcodec

Fix decoding of multithread-encoded lcl files on big-endian.
author reimar
date Sun, 31 May 2009 10:14:27 +0000
parents 14b65c693625
children 3242ae563430
files lcldec.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lcldec.c	Sun May 31 10:05:21 2009 +0000
+++ b/lcldec.c	Sun May 31 10:14:27 2009 +0000
@@ -189,9 +189,9 @@
         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 @@
             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;