[MPlayer-dev-eng] patch to re-enable audio on .ty streams for pre7 and beyond

Kevin Seghetti kts at tenetti.org
Tue May 17 18:03:33 CEST 2005


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 ---

Copy the above into a file (I call it mplayer-reenable-tivo-audio.patch
in the example below), then ut the pre7 tarball and the patch in a
directory, then do:

tar xvzf 'MPlayer-1.0pre7.tar.bz2'
cd 'MPlayer-1.0pre7'
patch -p0 -N <../mplayer-reenable-tivo-audio.patch

then the standard './configure ; make ; make install' should work. 

This patch also worked against the cvs tree a few weeks ago, haven't
tried it since then.

Let me know if you have any trouble.

Note that according to this list, this patch is not the proper long term
solution, that area of code is being re-factored, so this is just a
stop-gap measure until it is properly fixed in the code base.

-- 
Kevin Seghetti: E-Mail: kts at tenetti.org, HTTP: www.tenetti.org
GPG public key: http://tenetti.org/phpwiki/index.php/KevinSeghettiGPGKey
Check out www.worldfoundry.org for my GPL'ed 3D video game engine
Copyright is a temporary loan from the public domain, not property




More information about the MPlayer-dev-eng mailing list