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

D Richard Felker III dalias at aerifal.cx
Sun Feb 27 20:27:50 CET 2005


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 ;-)
> 
> It seems like my patches need more advertising before even getting noticed.

No, it needs significant fixes before it has any chance of getting
committed, though..

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

Rich





More information about the MPlayer-dev-eng mailing list