mirror of
https://github.com/mpv-player/mpv
synced 2025-04-26 21:29:16 +00:00
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
This commit is contained in:
parent
e06d2ac7ac
commit
813668889d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user