[MPlayer-dev-eng] [PATCH] Switch audio streams in AVI files
kiriuja
mplayer-patches at en-directo.net
Sat Oct 1 16:25:47 CEST 2005
On Friday 30 September 2005 10:05 Jochen Leopold wrote:
> I extended the source code to enable audio switching during the playback
> of AVI files.
>
>
> There are two files affected:
> - libmpdemux/demux_avi.c
> - mplayer.c
>
> I had to add a initialisation routine in mplayer.c for the switched
> audio streams.
> It was the only possibility to allow switching between different types
> of audio streams.
> Maybe you find a better solution for this problem.
The demux_avi.c part ignores the optional argument *((int*)arg) that
explicitly gives the audio track number to switch to. If that is < 0
then you do the cycling. Both demux_mpg.c and demux_mkv.c use the
argument.
The mplayer.c part is nothing but a humongous cut-and-paste from other
parts of the file with some minor changes. Instead you should move the
code to a separate function, making the necessary changes so that it
can be called from both places.
--
kiriuja
More information about the MPlayer-dev-eng
mailing list