diff options
Diffstat (limited to 'libavformat/oggparsevorbis.c')
-rw-r--r-- | libavformat/oggparsevorbis.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 75de0bdde5..51c5eb321f 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -72,7 +72,8 @@ static int ogm_chapter(AVFormatContext *as, uint8_t *key, uint8_t *val) } int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m, - const uint8_t *buf, int size) + const uint8_t *buf, int size, + int parse_picture) { const uint8_t *p = buf; const uint8_t *end = buf + size; @@ -137,7 +138,7 @@ int ff_vorbis_comment(AVFormatContext *as, AVDictionary **m, * 'METADATA_BLOCK_PICTURE'. This is the preferred and * recommended way of embedding cover art within VorbisComments." */ - if (!strcmp(tt, "METADATA_BLOCK_PICTURE")) { + if (!strcmp(tt, "METADATA_BLOCK_PICTURE") && parse_picture) { int ret; char *pict = av_malloc(vl); @@ -256,7 +257,7 @@ static int vorbis_update_metadata(AVFormatContext *s, int idx) /* New metadata packet; release old data. */ av_dict_free(&st->metadata); ret = ff_vorbis_comment(s, &st->metadata, os->buf + os->pstart + 7, - os->psize - 8); + os->psize - 8, 1); if (ret < 0) return ret; |