Skip to content

Commit

Permalink
player/loadfile: prefer independent track when selecting track
Browse files Browse the repository at this point in the history
Dependent tracks are supposed to be processed further and not directly
used.

For example, an HEIF tiled image tracks are meant to be stitched into a
full image before being displayed and requires special handling.

Another example would be MPEG-TS audio track tagged with mix_type=0.
Which means that the audio stream is a dependent stream and is intended
to be mixed or combined with a separate complete and independent audio
stream by the receiver.

In either case we should not directly select such tracks.
  • Loading branch information
kasper93 authored and sfan5 committed Nov 26, 2024
1 parent 81db344 commit ad1fb9f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions player/loadfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ static bool compare_track(struct track *t1, struct track *t2, char **langs, bool
return !t1->attached_picture;
if (t1->image != t2->image)
return !t1->image;
if (t1->dependent_track != t2->dependent_track)
return !t1->dependent_track;
if (t1->stream && t2->stream && opts->hls_bitrate >= 0 &&
t1->stream->hls_bitrate != t2->stream->hls_bitrate)
{
Expand Down

0 comments on commit ad1fb9f

Please sign in to comment.