[MPlayer-dev-eng] patch to re-enable audio on .ty streams for pre7 and beyond
Joey Parrish
joey at nicewarrior.org
Sat May 28 22:11:50 CEST 2005
On Tue, May 17, 2005 at 09:03:33AM -0700, Kevin Seghetti wrote:
> I have had a few requests for the patch to re-enable playing of .ty
> streams in pre7 and newer. Since the attachment was dropped when I
> posted in the first time, here it is inline:
>
> --- cut here ----
> diff -urN ../MPlayer-20050428.orig/libmpdemux/demuxer.c ./libmpdemux/demuxer.c
> --- ../MPlayer-20050428.orig/libmpdemux/demuxer.c 2005-04-03 07:08:26.000000000 -0700
> +++ ./libmpdemux/demuxer.c 2005-04-28 20:27:46.000000000 -0700
> @@ -1359,6 +1359,13 @@
> sh_audio=NULL;
> } else {
> sh_audio=d_audio->sh;sh_audio->ds=d_audio;
> + switch(d_audio->id & 0xE0){ // 1110 0000 b (high 3 bit: type low 5: id)
> + case 0x00: sh_audio->format=0x50;break; // mpeg
> + case 0xA0: sh_audio->format=0x10001;break; // dvd pcm
> + case 0x80: if((d_audio->id & 0xF8) == 0x88) sh_audio->format=0x2001;//dts
> + else sh_audio->format=0x2000;break; // ac3
> + default: sh_audio=NULL; // unknown type
> + }
> }
> }
> break;
> --- cut here ---
This code was moved from two "redundant" places in demuxer.c to one
place in demux_mpg.c. However, this code is now in a function private
to the mpeg demuxer, and thus is never called by the ty demuxer.
I'm going to go ahead and commit a fix in demux_ty.c because
1. The TY demux crashes on audio init.
2. The TY demux has no maintainer.
3. AFAIK I'm the only one working on it.
If there's a better alternative, we'll start a thread here or on cvslog
to discuss it. For now, though, I'm taking the initiative to make it
functional again.
--Joey
--
"I know Kung Fu." --Darth Vader
More information about the MPlayer-dev-eng
mailing list