[MPlayer-dev-eng] [PATCH] char sign fix

Guillaume Morin guillaume at morinfr.org
Sun Apr 14 13:33:27 CEST 2002


Hi,

Depending on the arch, a "char" is signed or unsigned by default. In
vd_huffyuv.c, the elements of a char[] are compared to -1. On PPC (where
char is by default unsigned), the comparison is always false leading to
false results.

Here is the patch which fixes that problem. 

diff -u -r1.2 vd_huffyuv.c
--- libmpcodecs/vd_huffyuv.c    22 Mar 2002 14:11:13 -0000      1.2
+++ libmpcodecs/vd_huffyuv.c    14 Apr 2002 11:29:17 -0000
@@ -719,7 +719,7 @@
        unsigned int add_shifted[256];
        char code_lengths[256];
        char code_firstbits[256];
-       char table_lengths[32];
+       signed char table_lengths[32];
        int all_zero_code=-1;
        int i, j, k;
        int firstbit, length, val;


Please keep me CC'ed, if you reply to this message.

-- 
Guillaume Morin <guillaume at morinfr.org>

      A part of me left that only you knew will never be understood (RHCP)



More information about the MPlayer-dev-eng mailing list