mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit 'e3528d2a7bf29ba148d7ac1678552ce0089cd14f'
* commit 'e3528d2a7bf29ba148d7ac1678552ce0089cd14f':
mov: Implement parsing of the "HandlerName" from the MP4 HDLR atom
Conflicts:
libavformat/mov.c
See: b76bc01034
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
a83e0639c0
|
@ -556,7 +556,7 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
uint32_t av_unused ctype;
|
uint32_t av_unused ctype;
|
||||||
int title_size;
|
int64_t title_size;
|
||||||
char *title_str;
|
char *title_str;
|
||||||
|
|
||||||
if (c->fc->nb_streams < 1) // meta before first trak
|
if (c->fc->nb_streams < 1) // meta before first trak
|
||||||
|
@ -594,9 +594,10 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
avio_read(pb, title_str, title_size);
|
avio_read(pb, title_str, title_size);
|
||||||
title_str[title_size] = 0;
|
title_str[title_size] = 0;
|
||||||
if (title_str[0])
|
if (title_str[0]) {
|
||||||
av_dict_set(&st->metadata, "handler_name", title_str +
|
int off = (!c->isom && title_str[0] == title_size - 1);
|
||||||
(!c->isom && title_str[0] == title_size - 1), 0);
|
av_dict_set(&st->metadata, "handler_name", title_str + off, 0);
|
||||||
|
}
|
||||||
av_freep(&title_str);
|
av_freep(&title_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue