[MPlayer-dev-eng] [PATCH] Return actual current stream id in slave mode

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jan 19 22:20:23 CET 2010


On Tue, Jan 19, 2010 at 06:11:42PM +0100, Adrian Stutz wrote:
> On Sun, Dec 27, 2009 at 3:22 PM, Adrian Stutz <adrian at sttz.ch> wrote:
> > On Sun, Dec 27, 2009 at 3:14 PM, Reimar Döffinger
> > <Reimar.Doeffinger at gmx.de> wrote:
> >> I am not really sure how to handle this best, so for now I just changed
> >> the parts I consider non-controversial.
> >> It does mean that frontends would have to recognize and handle the == -1
> >> and == -2 return values specially so far though.
> >
> > Thanks! Works for me.
> 
> Ups, I just noticed that using mpctx->demuxer->audio->id isn't
> correct. This is the demuxer's stream id and not the aid equivalent.
> These happens to be the same for avi but aren't for mkv. Currently,
> switch_audio uses mkv stream ids (sequentially for all streams) while
> the aid option uses zero-based ids for each stream type.
> 
> The correct place to take the current aid/vid stream id from seems to
> be the sh_(audio|video)_t struct. Patch for this attached, hopefully
> correct, tested with avi/mkv multistream samples.

I doubt this will give the right results with DVDs.
Try attached untested patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aid.diff
Type: text/x-diff
Size: 2166 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100119/2afd071a/attachment.diff>


More information about the MPlayer-dev-eng mailing list