mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
player: show HLS bitrate as fallback for track titles
HLS streams as demuxed by libavformat have no track title metadata. So show the HLS bitrate if no title is set. Could be useless or annoying, so it's a bit controversial, I guess.
This commit is contained in:
@@ -599,6 +599,8 @@ static void handle_stream(demuxer_t *demuxer, int i)
|
||||
if (lang && lang->value)
|
||||
sh->lang = talloc_strdup(sh, lang->value);
|
||||
sh->hls_bitrate = dict_get_decimal(st->metadata, "variant_bitrate", 0);
|
||||
if (!sh->title && sh->hls_bitrate > 0)
|
||||
sh->title = talloc_asprintf(sh, "bitrate %d", sh->hls_bitrate);
|
||||
}
|
||||
|
||||
select_tracks(demuxer, i);
|
||||
|
||||
Reference in New Issue
Block a user