From 370ed5777c6f0b7e89542bcd3357270b88e09e93 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 3 Dec 2019 21:04:53 +0100 Subject: demux: do not make up demuxer_id The demuxer_id (exported in as "src-id" property) is supposed to be the native stream ID, as it exists in the file, or -1 if that does not exist (actually any negative value), or if it is unknown. Until now, an ID was made up if it was missing. That seems like strange non-sense, and I can't find the reason why it was done. But it was probably for convenience by the EDL stuff or so. Stop doing this. Fortunately, the src-id property was documented as being unavailable if the ID is not known. Even the code for this was present, it was just inactive until now. Extend input.rst with some explanations. Also fixing 3 other places where negative demuxer_id was ignored or avoided. --- demux/demux_timeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux/demux_timeline.c') diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c index aefca9f1c9..f8f096c464 100644 --- a/demux/demux_timeline.c +++ b/demux/demux_timeline.c @@ -133,7 +133,7 @@ static void associate_streams(struct demuxer *demuxer, // Matching by demuxer ID is supposedly useful and preferable for // ordered chapters. - if (sh->demuxer_id == vs->sh->demuxer_id) + if (sh->demuxer_id >= 0 && sh->demuxer_id == vs->sh->demuxer_id) other = vs; } -- cgit v1.2.3