diff options
author | hzoli <hzoli@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-05-24 06:54:19 +0000 |
---|---|---|
committer | hzoli <hzoli@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-05-24 06:54:19 +0000 |
commit | 813668889dbef2b9711b279ad8081b296f1881e1 (patch) | |
tree | 30fbd75e6ccb9ed55b54f65a685350108ccf4457 | |
parent | e06d2ac7ac32ae5c265b3814151dce8cd93c3fb6 (diff) |
Make sure that samplesize is at least 2, as some demuxers set it to 1
(demux_ogg for ac3 in ogm) or possibly even 0, and it causes preinit
to set audio_out_minsize too low, which causes overflow (assert).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15560 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/ad_liba52.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libmpcodecs/ad_liba52.c b/libmpcodecs/ad_liba52.c index 8003757158..7457387d3d 100644 --- a/libmpcodecs/ad_liba52.c +++ b/libmpcodecs/ad_liba52.c @@ -126,6 +126,7 @@ static int preinit(sh_audio_t *sh) { /* Dolby AC3 audio: */ /* however many channels, 2 bytes in a word, 256 samples in a block, 6 blocks in a frame */ + if (sh->samplesize < 2) sh->samplesize = 2; sh->audio_out_minsize=audio_output_channels*sh->samplesize*256*6; sh->audio_in_minsize=3840; a52_level = 1.0; |