aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3.h
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2008-12-08 03:13:20 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2008-12-08 03:13:20 +0000
commit72a6244b5d554d7fdfdeb04c174750c7a2c52f83 (patch)
tree8e9f106f4681f2e6e537e5c01ec7eb51ce835951 /libavcodec/ac3.h
parentb9f382c8ef55bd2b1a6821bf060e848deda372f1 (diff)
downloadffmpeg-72a6244b5d554d7fdfdeb04c174750c7a2c52f83.tar.gz
ac3: detect dba errors and prevent writing past end of array
Originally committed as revision 16034 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3.h')
-rw-r--r--libavcodec/ac3.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index 1f5a7115d7..5ece9acf84 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -149,8 +149,9 @@ void ff_ac3_bit_alloc_calc_psd(int8_t *exp, int start, int end, int16_t *psd,
* @param[in] dba_lengths length of each segment
* @param[in] dba_values delta bit allocation for each segment
* @param[out] mask calculated masking curve
+ * @return returns 0 for success, non-zero for error
*/
-void ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
+int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
int start, int end, int fast_gain, int is_lfe,
int dba_mode, int dba_nsegs, uint8_t *dba_offsets,
uint8_t *dba_lengths, uint8_t *dba_values,