You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
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>
This commit is contained in:
committed by
Michael Niedermayer
parent
13f86baa1d
commit
4943eff2cd
@@ -2046,16 +2046,25 @@ static int mov_write_int8_metadata(AVFormatContext *s, AVIOContext *pb,
|
|||||||
{
|
{
|
||||||
AVDictionaryEntry *t = NULL;
|
AVDictionaryEntry *t = NULL;
|
||||||
uint8_t num;
|
uint8_t num;
|
||||||
|
int size = 24 + len;
|
||||||
|
|
||||||
|
if (len != 1 && len != 4)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (!(t = av_dict_get(s->metadata, tag, NULL, 0)))
|
if (!(t = av_dict_get(s->metadata, tag, NULL, 0)))
|
||||||
return 0;
|
return 0;
|
||||||
num = atoi(t->value);
|
num = atoi(t->value);
|
||||||
|
|
||||||
avio_wb32(pb, len+8);
|
avio_wb32(pb, size);
|
||||||
ffio_wfourcc(pb, name);
|
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);
|
if (len==4) avio_wb32(pb, num);
|
||||||
else avio_w8 (pb, num);
|
else avio_w8 (pb, num);
|
||||||
return len+8;
|
|
||||||
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* iTunes meta data list */
|
/* iTunes meta data list */
|
||||||
|
Reference in New Issue
Block a user