aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2013-06-29 17:56:49 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-03 17:18:49 +0200
commit4943eff2cd281518461baf89775859e86dd83d0e (patch)
tree9b23ad39774fd7a94496adf7ac25b5f3b65887b6 /libavformat
parent13f86baa1d98c89e6ac176f182e7a1ebc7c260b7 (diff)
downloadffmpeg-4943eff2cd281518461baf89775859e86dd83d0e.tar.gz
lavf/movenc: fix writing of some iTunes metadata tag
Fix metadata display under iTunes for files using pgap, hdvd, stick, tvsn and tves tags. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/movenc.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index c19d58d683..5d224bcacb 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2046,16 +2046,25 @@ static int mov_write_int8_metadata(AVFormatContext *s, AVIOContext *pb,
{
AVDictionaryEntry *t = NULL;
uint8_t num;
+ int size = 24 + len;
+
+ if (len != 1 && len != 4)
+ return -1;
if (!(t = av_dict_get(s->metadata, tag, NULL, 0)))
return 0;
num = atoi(t->value);
- avio_wb32(pb, len+8);
+ avio_wb32(pb, size);
ffio_wfourcc(pb, name);
+ avio_wb32(pb, size - 8);
+ ffio_wfourcc(pb, "data");
+ avio_wb32(pb, 0x15);
+ avio_wb32(pb, 0);
if (len==4) avio_wb32(pb, num);
else avio_w8 (pb, num);
- return len+8;
+
+ return size;
}
/* iTunes meta data list */