summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.h
diff options
context:
space:
mode:
authorAndreas Cadhalpun <andreas.cadhalpun@googlemail.com>2015-03-13 22:28:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-14 04:27:06 +0100
commit7b05b5093ea67a3397b0c37cf398bab471e1ce2b (patch)
tree953130f4daa85a7bf2e93a2aa1c3ff0d098ff632 /libavcodec/ac3dec.h
parente16592c42e877ab93a9a719ca69df22c2a487a98 (diff)
downloadffmpeg-7b05b5093ea67a3397b0c37cf398bab471e1ce2b.tar.gz
ac3dec_fixed: always use the USE_FIXED=1 variant of the AC3DecodeContext
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3dec.h')
-rw-r--r--libavcodec/ac3dec.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index be29f00b14..5259c60009 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -243,19 +243,19 @@ typedef struct AC3DecodeContext {
* Parse the E-AC-3 frame header.
* This parses both the bit stream info and audio frame header.
*/
-int ff_eac3_parse_header(AC3DecodeContext *s);
+static int ff_eac3_parse_header(AC3DecodeContext *s);
/**
* Decode mantissas in a single channel for the entire frame.
* This is used when AHT mode is enabled.
*/
-void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch);
+static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch);
/**
* Apply spectral extension to each channel by copying lower frequency
* coefficients to higher frequency bins and applying side information to
* approximate the original high frequency signal.
*/
-void ff_eac3_apply_spectral_extension(AC3DecodeContext *s);
+static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s);
#endif /* AVCODEC_AC3DEC_H */