[MPlayer-dev-eng] [PATCH] iec958
Diego Biurrun
diego at biurrun.de
Tue Aug 29 01:46:03 CEST 2006
On Mon, Aug 28, 2006 at 02:51:06PM -0700, Remus Koos wrote:
>
> 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.
That AC3 special-casing looks hackish to me. Try to get Clemens Ladisch
(CCed) to look at the issue, he is the vo_alsa maintainer, maybe he can
come up with a clean solution.
Diego
More information about the MPlayer-dev-eng
mailing list