[MPlayer-dev-eng] [PATCH] Online audio stream switching

D Richard Felker III dalias at aerifal.cx
Mon Feb 28 16:37:53 CET 2005


On Mon, Feb 28, 2005 at 10:38:14AM +0100, Michael Behrisch wrote:
> On Sun, Feb 27, 2005 at 02:27:50PM -0500, D Richard Felker III wrote:
> > On Sun, Feb 27, 2005 at 08:03:16PM +0100, Michael Behrisch wrote:
> > > On Thu, Feb 24, 2005 at 07:01:14PM +0100, Michael Behrisch wrote:
> > > > The attached patch enables audio stream switching
> > > > in the mpg demuxer using the #-key. It is not complete yet,
> > > > because manpage is not updated, but I wanted to get some
> > > > opinions before doing the really hard work ;-)
> > > 
> > > OK here we go. This patch lets you instantly switch from german to english
> > > on your favorite dvd to hear the original version of that four letter word.
> > > 
> > > A single keypress instead of stopping, looking for the right aid and 
> > > restarting and searching over and over again. (It works only if both audio 
> > > streams have the same format, but it works.) And it can also walk your dog.
> > 
> > A single keypress will make it horribly crash unless the new audio
> > track has exactly the same codec and format as the old one. This is
> > very bad. Consider DVDs that have some tracks as 2.0 AC3 and others as
> > 5.1 AC3, or a mix of AC3, PCM, and DTS. Unless you work out all the
> > mess to close down and reinitialize the audio layer for the newly
> > selected audio track, a patch like this (which only works on a very
> > limited number of files and crashes on all the rest) is not
> > acceptable. I know it's very hard to do this right (that's why no one
> > has done it yet..) but that's the way it is. Sorry..
> > 
> 
> Well, the patch already knows about the difference between AC3, PCM and DTS
> and switches only between streams of the same format. Switching
> between 2.0 AC3 and 5.1 AC3 did not make problems here but please
> send me a sample where it does.

do you have a 5.1 setup? if not, it will just decode both as 2.0 so no
problem should arise...but i wonder what happens if you have 5.1
output available..

rich




More information about the MPlayer-dev-eng mailing list