• Andreas Cadhalpun's avatar
    ac3dec_fixed: always use the USE_FIXED=1 variant of the AC3DecodeContext · 7b05b509
    Andreas Cadhalpun authored
    The AC3DecodeContext has a float (USE_FIXED=0) and an integer
    (USE_FIXED=1) variant, both of which can be present in the same binary.
    This is not only very confusing, but it also breaks horribly, when one
    variant is used by code expecting the other.
    
    This currently happens, because eac3dec.c is only compiled for the float
    variant, but also used from ac3dec_fixed.c, which uses the integer
    variant.
    
    The result is memory corruption, leading to crashes.
    
    So compile eac3dec.c once for each variant and adapt it, so that it
    works with the integer variant.
    
    A loss of precission and scaling bug has been fixed by the committer
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    7b05b509
ac3dec_float.c 3.92 KB