[MPlayer-dev-eng] [PATCH] Add support for default of multiple video tracks

Ingo Brückl ib at wupperonline.de
Tue Jan 28 15:36:50 CET 2014

Reimar Döffinger wrote on Tue, 28 Jan 2014 08:44:04 +0100:

> On 28 January 2014 00:09:40 CET, "Ingo Brückl" <ib at wupperonline.de>
> wrote:
>>Reimar Döffinger wrote on Mon, 27 Jan 2014 23:55:42 +0100:
>>> On 27.01.2014, at 21:55, Ingo Brückl <ib at wupperonline.de> wrote:
>>>> I wrote on Mon, 27 Jan 2014 19:20:07 +0100:
>>>> The mplayer.c part of the patch attached to this posting doesn't change
>>>> video_id which is preferable.
>>> This doesn't seem right/make sense to me.
>>> The stream selection code if I remember right is in the code that adds a
>>> new stream.

> The issue is, that when we get a new stream we must immediately decide
> to play it or not, otherwise we might lose data.
> But that means when a default stream comes later, you actually have to
> _switch_ streams, discarding data, reinitializing decoders, ...
> And this might not be desirable anyway.

I admit that I don't know much about demuxing, so maybe I've got something
wrong with this idea of selecting the default video stream. On the other
hand, we are doing it already for audio and subtitles. (And very similar
if I don't get it wrong.)

> One way to solve this is to forget about doing it correctly but instead
> only fix the simple cases while making sure not to make the complex ones
> worse.

Well, I'd be glad if at least the default video stream after demux open would
get selected. This will be done by the patch I've proposed. It may not handle
the case that streams change during playback, but it is at least far much
better than what we have currently.

And, default audio gets handled very similar at the very same position in
mplayer.c. Is audio different from video in this regard?

> That can be done by making sure the demuxer creates all default streams
> it knows about from the start first.

Doesn't the patch of libmpdemux/demux_lavf.c do this?

Just in case we might talk at cross purposes, here is the full (and revised)
patch again.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: multi-video.v2.patch
Type: text/x-diff
Size: 2374 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140128/4facf5c3/attachment.bin>

More information about the MPlayer-dev-eng mailing list