@@ -1141,6 +1141,10 @@ static int write_manifest(AVFormatContext *s, int
final)
int use_rename = proto && !strcmp(proto, "file");
static unsigned int warned_non_file = 0;
AVDictionaryEntry *title = av_dict_get(s->metadata, "title", NULL, 0);
+ AVDictionaryEntry *source = av_dict_get(s->metadata, "source",
NULL, 0);
+ AVDictionaryEntry *copyright = av_dict_get(s->metadata,
"copyright", NULL, 0);
+ AVDictionaryEntry *lang = av_dict_get(s->metadata, "lang", NULL, 0);
+ AVDictionaryEntry *moreInformationURL = av_dict_get(s->metadata,
Now metadata fields for source, copyright, lang and moreInformationURL are supported too. Evidence for the need of such support: https://docs.rs/dash-mpd/0.6.3/dash_mpd/struct.ProgramInformation.html and https://github.com/DroidFreak32/myjio_unrestrict/blob/805a8b48d02c5618608bf6fb2bfc2b450f1f057a/smali_classes2/com/google/android/exoplayer2/source/dash/manifest/ProgramInformation.smali#L19 Signed-off-by: Davy Durham <ddurham@users.sourceforge.net> --- libavformat/dashenc.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) "moreInformationURL", NULL, 0); AVDictionary *opts = NULL; if (!use_rename && !warned_non_file++) @@ -1203,6 +1207,26 @@ static int write_manifest(AVFormatContext *s, int final) avio_printf(out, "\t\t<Title>%s</Title>\n", escaped); av_free(escaped); } + if (source) { + char *escaped = xmlescape(source->value); + avio_printf(out, "\t\t<Source>%s</Source>\n", escaped); + av_free(escaped); + } + if (copyright) { + char *escaped = xmlescape(copyright->value); + avio_printf(out, "\t\t<Copyright>%s</Copyright>\n", escaped); + av_free(escaped); + } + if (lang) { + char *escaped = xmlescape(lang->value); + avio_printf(out, "\t\t<lang>%s</lang>\n", escaped); + av_free(escaped); + } + if (moreInformationURL) { + char *escaped = xmlescape(moreInformationURL->value); + avio_printf(out, "\t\t<moreInformationURL>%s</moreInformationURL>\n", escaped); + av_free(escaped); + } avio_printf(out, "\t</ProgramInformation>\n"); avio_printf(out, "\t<ServiceDescription id=\"0\">\n");