Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / ffmpeg / libavformat / oggparsevorbis.c
index 2d8cb15..8103d9d 100644 (file)
@@ -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;