diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-13 09:49:50 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-13 09:51:00 +0200 |
commit | 77caa31f717a0cab628c05fcd61cf6d78fba527e (patch) | |
tree | 1b00f3dc2ae5f63f64ba76788dc3da4680e3ad15 /libavformat | |
parent | 92b03cf926efae224762dcc74d035cbf67b45368 (diff) | |
parent | c18375ec8040a9fe0f186b2033dc975883143758 (diff) | |
download | ffmpeg-77caa31f717a0cab628c05fcd61cf6d78fba527e.tar.gz |
Merge commit 'c18375ec8040a9fe0f186b2033dc975883143758'
* commit 'c18375ec8040a9fe0f186b2033dc975883143758':
oggvorbisdec: add support for embedded cover art
Conflicts:
libavformat/oggparsevorbis.c
See: 193782216fc8179ec92d498449be0a51e4c7c658
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/oggparsevorbis.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index a63e5978d9..e031c7b0b3 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -132,6 +132,12 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m, memcpy(ct, v, vl); ct[vl] = 0; + /* The format in which the pictures are stored is the FLAC format. + * Xiph says: "The binary FLAC picture structure is base64 encoded + * and placed within a VorbisComment with the tag name + * 'METADATA_BLOCK_PICTURE'. This is the preferred and + * recommended way of embedding cover art within VorbisComments." + */ if (!strcmp(tt, "METADATA_BLOCK_PICTURE")) { int ret; char *pict = av_malloc(vl); @@ -144,9 +150,9 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m, } if ((ret = av_base64_decode(pict, ct, vl)) > 0) ret = ff_flac_parse_picture(as, pict, ret); - av_freep(&pict); av_freep(&tt); av_freep(&ct); + av_freep(&pict); if (ret < 0) { av_log(as, AV_LOG_WARNING, "Failed to parse cover art block.\n"); continue; |