From e16d0dd15d447921c34528df2a363e6afbb8288b Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Wed, 15 Sep 2021 21:33:47 +0200 Subject: command: with lavfi-complex, make current-tracks return the first one This behavior is more convenient and allows profile conditions like: [video] profile-cond=get('current-tracks/video/image') == false [image] profile-cond=get('current-tracks/video/image') Otherwise, these profiles have to be manually applied and restored in a script. The note about discouraging the use of current-tracks in scripts is removed, because it makes people avoid using this convenient property. It was added in 720bcd79d03 without leaving an explanation of why you shouldn't use it, and the only reason seems to be that it doesn't work with lavfi-complex, but this commit changes that. --- DOCS/man/input.rst | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 1a148589dd..bc1b1abd77 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2976,15 +2976,8 @@ Property list For example, ``current-tracks/audio/lang`` returns the current audio track's language field (the same value as ``track-list/N/lang``). - A sub-entry is accessible only if a track of that type is actually selected. - Tracks selected via ``--lavfi-complex`` never appear under this property. - ``current-tracks`` and ``current-tracks/`` are currently not accessible, and - will not return anything. - - Scripts etc. should not use this. They should use ``track-list``, loop over - all tracks, and inspect the ``selected`` field to test whether a track is - selected (or compare the ``id`` field to the ``video`` / ``audio`` etc. - options). + If tracks of the requested type are selected via ``--lavfi-complex``, the + first one is returned. ``chapter-list`` List of chapters, current entry marked. Currently, the raw property value -- cgit v1.2.3