summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2016-09-27 01:10:22 +0300
committerJosh de Kock <josh@itanimul.li>2016-09-29 10:32:03 +0100
commitcc725ebe484c7e0d8de44e5c3c2050dc894e5a4b (patch)
tree0503b77d529966a3625c1ad2d4a525ccf7530e2f /libavformat
parentdba2db6c0e4a18b9b69b846650401bf3a1d5a019 (diff)
downloadffmpeg-cc725ebe484c7e0d8de44e5c3c2050dc894e5a4b.tar.gz
movenc: Add support for writing language codes into ISML manifests
Streaming servers appear to ignore all other language metadata. Signed-off-by: Jan Ekström <jeebjp@gmail.com> Signed-off-by: Josh de Kock <josh@itanimul.li>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 8992782c8c..7de45804c7 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3611,6 +3611,9 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov, AVFormat
const char *type;
int track_id = track->track_id;
+ AVStream *st = track->st;
+ AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,0);
+
if (track->par->codec_type == AVMEDIA_TYPE_VIDEO) {
type = "video";
} else if (track->par->codec_type == AVMEDIA_TYPE_AUDIO) {
@@ -3631,6 +3634,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov, AVFormat
manifest_bit_rate);
param_write_int(pb, "systemBitrate", manifest_bit_rate);
param_write_int(pb, "trackID", track_id);
+ param_write_string(pb, "systemLanguage", lang ? lang->value : "und");
if (track->par->codec_type == AVMEDIA_TYPE_VIDEO) {
if (track->par->codec_id == AV_CODEC_ID_H264) {
uint8_t *ptr;