diff options
author | Justin Ruggles | 2011-06-13 17:44:50 -0400 |
---|---|---|
committer | Justin Ruggles | 2011-06-13 17:49:37 -0400 |
commit | 99477adc31c0569b3cebe8004dd584aa4726a2d1 (patch) | |
tree | 1569d3312cf71e9a5c4b152c221d44205b744a54 /libavcodec/ac3enc.h | |
parent | 35bdaf3d427b6856df01d41ee826bd515440ec46 (diff) |
ac3enc: fix allocation of floating point samples.
sizeof(SampleType) is different for fixed and float encoders.
Diffstat (limited to 'libavcodec/ac3enc.h')
-rw-r--r-- | libavcodec/ac3enc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h index 1d17484321..bf25298940 100644 --- a/libavcodec/ac3enc.h +++ b/libavcodec/ac3enc.h @@ -135,6 +135,7 @@ typedef struct AC3Block { typedef struct AC3EncodeContext { AVClass *av_class; ///< AVClass used for AVOption AC3EncOptions options; ///< encoding options + AVCodecContext *avctx; ///< parent AVCodecContext PutBitContext pb; ///< bitstream writer context DSPContext dsp; AC3DSPContext ac3dsp; ///< AC-3 optimized functions @@ -230,6 +231,7 @@ typedef struct AC3EncodeContext { void (*scale_coefficients)(struct AC3EncodeContext *s); /* fixed vs. float templated function pointers */ + int (*allocate_sample_buffers)(struct AC3EncodeContext *s); void (*deinterleave_input_samples)(struct AC3EncodeContext *s, const SampleType *samples); void (*apply_mdct)(struct AC3EncodeContext *s); @@ -276,6 +278,9 @@ void ff_ac3_float_scale_coefficients(AC3EncodeContext *s); /* prototypes for functions in ac3enc_template.c */ +int ff_ac3_fixed_allocate_sample_buffers(AC3EncodeContext *s); +int ff_ac3_float_allocate_sample_buffers(AC3EncodeContext *s); + void ff_ac3_fixed_deinterleave_input_samples(AC3EncodeContext *s, const SampleType *samples); void ff_ac3_float_deinterleave_input_samples(AC3EncodeContext *s, |