player/command: make track-list/N/ff-index optional
The `ff-index` is just a index of in the track order, it doesn't carry much meaning and may be wrong or unavailable when other than lavf demuxer is used. Additionally some tracks may be virtual like DOVI EL track or merged image tile grid. In which case those track are not related to lavf at all. No deprecation period. It was never guaranteed to match FFmpeg anyway, so anyone who has a hard dependency on this property should reconsider. It's not really possible to provide backward compatibility given the ambiguity of this index. It's better to make it unavailable than making mismatch. For user it's clear when it's not available, but not possible to know when it's wrong.
This commit is contained in:
1 parent
68387ea859
commit
e517fd6043
3 files changed
+4
-2
No files matched your search
+2
-1
@@ -2115,7 +2115,8 @@ static int get_track_entry(int item, int action, void *arg, void *ctx)
|
||||
{"main-selection", SUB_PROP_INT(order), .unavailable = order < 0},
|
||||
{"external-filename", SUB_PROP_STR(track->external_filename),
|
||||
.unavailable = !track->external_filename},
|
||||
{"ff-index", SUB_PROP_INT(track->ff_index)},
|
||||
{"ff-index", SUB_PROP_INT(track->ff_index),
|
||||
.unavailable = track->ff_index == -1},
|
||||
{"hls-bitrate", SUB_PROP_INT(track->hls_bitrate),
|
||||
.unavailable = !track->hls_bitrate},
|
||||
{"program-id", SUB_PROP_INT(sh && sh->num_program_ids ? sh->program_ids[0] : -1),
|
||||
|
||||
Reference in new issue
Block a user