Mercurial > mplayer.hg
diff libao2/ao_alsa.c @ 30237:9584cf67cea0
Use af_fmt2bits, it should give more sensible values than snd_pcm_format_physical_width,
especially for AC3.
author | reimar |
---|---|
date | Mon, 11 Jan 2010 19:40:58 +0000 |
parents | 9d09ff127c25 |
children | 02b9c1a452e1 |
line wrap: on
line diff
--- a/libao2/ao_alsa.c Mon Jan 11 19:37:50 2010 +0000 +++ b/libao2/ao_alsa.c Mon Jan 11 19:40:58 2010 +0000 @@ -574,7 +574,7 @@ 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;