mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
demux, player: mark dependent tracks
ffmpeg marks audio tracks which are not meant to be played standalone as DEPENDENT. these are typically used in DVB broadcasts for audio descriptions, and are meant to be mixed into the main audio track during playback.
This commit is contained in:
@@ -724,6 +724,8 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
|
||||
sh->title = talloc_asprintf(sh, "visual impaired");
|
||||
if (!sh->title && st->disposition & AV_DISPOSITION_HEARING_IMPAIRED)
|
||||
sh->title = talloc_asprintf(sh, "hearing impaired");
|
||||
if (st->disposition & AV_DISPOSITION_DEPENDENT)
|
||||
sh->dependent_track = true;
|
||||
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
|
||||
if (lang && lang->value)
|
||||
sh->lang = talloc_strdup(sh, lang->value);
|
||||
|
||||
@@ -45,6 +45,7 @@ struct sh_stream {
|
||||
char *lang; // language code
|
||||
bool default_track; // container default track flag
|
||||
bool forced_track; // container forced track flag
|
||||
bool dependent_track; // container dependent track flag
|
||||
int hls_bitrate;
|
||||
|
||||
struct mp_tags *tags;
|
||||
|
||||
Reference in New Issue
Block a user