demux_lavf: map comment to stream title

Lavf HLS demmuxer put rendition names into `comment`, this is basically
a title in our usage.
This commit is contained in:
Kacper Michajłow
2026-05-01 06:09:27 +02:00
parent ec03ef7e97
commit 8aef2c9162
+3
View File
@@ -851,6 +851,9 @@ static void handle_new_stream(demuxer_t *demuxer, int i)
AVDictionaryEntry *title = av_dict_get(st->metadata, "title", NULL, 0);
if (title && title->value)
sh->title = talloc_strdup(sh, title->value);
AVDictionaryEntry *comment = av_dict_get(st->metadata, "comment", NULL, 0);
if (!sh->title && comment && comment->value)
sh->title = talloc_strdup(sh, comment->value);
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
if (lang && lang->value && strcmp(lang->value, "und") != 0)
sh->lang = talloc_strdup(sh, lang->value);