mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
Use af_fmt2bits, it should give more sensible values than snd_pcm_format_physical_width,
especially for AC3. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30279 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
76feee19c4
commit
e3c9e9a09b
@ -574,7 +574,7 @@ static int init(int rate_hz, int channels, int format, int flags)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bytes_per_sample = snd_pcm_format_physical_width(alsa_format) / 8;
|
||||
bytes_per_sample = af_fmt2bits(ao_data.format) / 8;
|
||||
bytes_per_sample *= ao_data.channels;
|
||||
ao_data.bps = ao_data.samplerate * bytes_per_sample;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user