Message ID | 20210401115107.53832-1-martin@martin.st |
---|---|
State | Accepted |
Commit | a99dd5f6a4cf263bdbbb18f6b665f3399995ab26 |
Headers | show |
Series | [FFmpeg-devel,1/2] mov: Pick up "com.apple.quicktime.artwork" as cover art | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On Thu, 1 Apr 2021, Martin Storsjö wrote: > --- > libavformat/mov.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) Ping // Martin
On Thu, 15 Apr 2021, Martin Storsjö wrote: > On Thu, 1 Apr 2021, Martin Storsjö wrote: > >> --- >> libavformat/mov.c | 22 ++++++++++++---------- >> 1 file changed, 12 insertions(+), 10 deletions(-) > > Ping Ping (see https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210401115107.53832-1-martin@martin.st/ for the original patch in itself). // Martin
On 4/1/2021 12:51 PM, Martin Storsjö wrote: > --- > libavformat/mov.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) OK. I would just push in the future after waiting so long. - Derek
On Tue, 13 Jul 2021, Derek Buitenhuis wrote: > On 4/1/2021 12:51 PM, Martin Storsjö wrote: >> --- >> libavformat/mov.c | 22 ++++++++++++---------- >> 1 file changed, 12 insertions(+), 10 deletions(-) > > OK. Thanks > I would just push in the future after waiting so long. Sure, although in particular for patch 2/2 I kinda wanted someone else to doublecheck my reasoning... (I don't see a reply to that one although it might be stuck in mailing list delays.) // Martin
diff --git a/libavformat/mov.c b/libavformat/mov.c index a1411264ec..162772f499 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -410,7 +410,18 @@ retry: str_size = data_size - 16; atom.size -= 16; - if (atom.type == MKTAG('c', 'o', 'v', 'r')) { + if (!key && c->found_hdlr_mdta && c->meta_keys) { + uint32_t index = AV_RB32(&atom.type); + if (index < c->meta_keys_count && index > 0) { + key = c->meta_keys[index]; + } else if (atom.type != MKTAG('c', 'o', 'v', 'r')) { + av_log(c->fc, AV_LOG_WARNING, + "The index of 'data' is out of range: %"PRId32" < 1 or >= %d.\n", + index, c->meta_keys_count); + } + } + if (atom.type == MKTAG('c', 'o', 'v', 'r') || + (key && !strcmp(key, "com.apple.quicktime.artwork"))) { int ret = mov_read_covr(c, pb, data_type, str_size); if (ret < 0) { av_log(c->fc, AV_LOG_ERROR, "Error parsing cover art.\n"); @@ -420,15 +431,6 @@ retry: if (atom.size > 8) goto retry; return ret; - } else if (!key && c->found_hdlr_mdta && c->meta_keys) { - uint32_t index = AV_RB32(&atom.type); - if (index < c->meta_keys_count && index > 0) { - key = c->meta_keys[index]; - } else { - av_log(c->fc, AV_LOG_WARNING, - "The index of 'data' is out of range: %"PRId32" < 1 or >= %d.\n", - index, c->meta_keys_count); - } } } else return 0; } else if (atom.size > 4 && key && !c->itunes_metadata && !raw) {