diff options
author | Timo Teräs <timo.teras@iki.fi> | 2018-03-29 15:59:33 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-04-01 02:58:51 +0200 |
commit | 8c980b1c92bbc98ed12b6a43269572aaacf31426 (patch) | |
tree | 31561ea57fe773cf22385680c632a1d49e4b12b7 | |
parent | 8247e0304ed5fa862e8ea30867ebc6e0b30d2fab (diff) | |
download | ffmpeg-8c980b1c92bbc98ed12b6a43269572aaacf31426.tar.gz |
avformat/mov: parse multiple iTunes cover images
Multiple cover images are supported by having multiple data atoms
inside the covr atom. AtomicParsley and mutagen amongst others
support and document this construct.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index cb6f3a45de..e7c32e6148 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -412,7 +412,11 @@ retry: 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"); + return ret; } + atom.size -= str_size; + 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); |