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

Adrian Stutz adrian at sttz.ch
Tue Jan 19 18:11:42 CET 2010


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.

Greetings
Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: property_use_actual_id_instead_of_demuxer_id.diff
Type: application/octet-stream
Size: 2607 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100119/edb86f16/attachment.obj>


More information about the MPlayer-dev-eng mailing list