From f0f83ff36600abc8715f3a11c31b2eeeda6c8c92 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 21 Oct 2014 13:16:48 +0200 Subject: player: add stream selection by ffmpeg index Apparently using the stream index is the best way to refer to the same streams across multiple FFmpeg-using programs, even if the stream index itself is rarely meaningful in any way. For Matroska, there are some possible problems, depending how FFmpeg actually adds streams. Normally they seem to match though. --- demux/demux.c | 1 + 1 file changed, 1 insertion(+) (limited to 'demux/demux.c') diff --git a/demux/demux.c b/demux/demux.c index e5cd4d53fe..7c563e9625 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -190,6 +190,7 @@ struct sh_stream *new_sh_stream(demuxer_t *demuxer, enum stream_type type) *sh = (struct sh_stream) { .type = type, .index = demuxer->num_streams, + .ff_index = demuxer->num_streams, .demuxer_id = demuxer_id, // may be overwritten by demuxer .ds = talloc(sh, struct demux_stream), }; -- cgit v1.2.3