[MPlayer-dev-eng] [PATCH] iec958

Remus Koos remuskoos at yahoo.com
Mon Aug 28 23:51:06 CEST 2006


  Hi !
  I posted this patch a while ago on this list and I was wondering if it could
be included in the mainstream code. It's a very simple patch but it fixes a
serious problem (at least for freevo users). It basically allows you to play
all the files regardless if they have AC3 sound or not using the same sintax.

  Full description of the problem is here:
http://itdp.fh-biergarten.de/~itdp/html/mplayer-users/2005-04/msg00028.html

  What the patch does is basically disable suboption parsing for alsa if the
stream type is AC3. This way if the device specified is iec958 but the stream
type is AC3 then the proper device will be selected by mplayer (iec958:{CARD 0
AES0 0x02 AES1 0x82 AES2 0x00 AES3 0x02}). If the stream is not AC3 then iec958
is used. This allows different streams to be played through the SPDIF interface
using the same syntax.

  The patch is included below or you can get it from here: 
http://remus.gotdns.com/WebRoot$/the2nd/mplayer-1.0pre8-iec958.patch

--- MPlayer-1.0pre8/libao2/ao_alsa.c	2006-06-11 11:35:42.000000000 -0700
+++ MPlayer-1.0pre8.patched/libao2/ao_alsa.c	2006-07-25 17:12:50.000000000
-0700
@@ -413,9 +413,11 @@
 	  mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: %d channels are not
supported\n",channels);
         }
     device.len = strlen(device.str);
-    if (subopt_parse(ao_subdevice, subopts) != 0) {
-        print_help();
-        return 0;
+    if (format != AF_FORMAT_AC3) {
+        if (subopt_parse(ao_subdevice, subopts) != 0) {
+            print_help();
+            return 0;
+        }
     }
     ao_noblock = !block;
     parse_device(alsa_device, device.str, device.len);


  I would appreciate if someone could take a quick look at the patch and see if
it can be included.
  Thanks a lot, 

    remus

"There is no teacher who can teach anything new, he can just help us to remember the things we always knew."

                    Enigma - Odyssey Of The Mind

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the MPlayer-dev-eng mailing list