[MPlayer-dev-eng] ALSA issue, r29549 fix seems incomplete

Sylvain Bertrand sylvain.bertrand at gmail.com
Tue Dec 1 19:20:45 CET 2009


I have a 5.1 USB Audio device. I have a custom /etc/asound.conf that
dmixes the surround51 device (plug->route->dmix->hw).
Sound comes from a ac3 (a52 decoded) track extracted from a mkv container.
I get right at file start states in the libao2 alsa play function
where there are "len" bytes to play which is less than the
"ao_data.outburst" buffer size and are not part of a
"AOPLAY_FINAL_CHUNK" chunk.
My understanding of mplayer internals/alsa is limited, so the issue
may be quite worse. On my system, it works.

--- ao_alsa.c.old	2009-12-01 17:26:36.000000000 +0100
+++ ao_alsa.c.new	2009-12-01 17:25:42.000000000 +0100
@@ -773,7 +773,7 @@
 {
   int num_frames;
   snd_pcm_sframes_t res = 0;
-  if (!(flags & AOPLAY_FINAL_CHUNK))
+  if (!(flags & AOPLAY_FINAL_CHUNK) && len > ao_data.outburst)
 	len = len / ao_data.outburst * ao_data.outburst;
   num_frames = len / bytes_per_sample;



More information about the MPlayer-dev-eng mailing list