]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/oggparsevorbis.c
avformat: Switch AVChapter.id to 64bits
[ffmpeg] / libavformat / oggparsevorbis.c
index 6f15204adabc96ad3e0ec82e5c1660fc7e7785a1..0e8c25c030b908653c87775db3e4d3637a6b8b9d 100644 (file)
@@ -287,7 +287,7 @@ static int vorbis_update_metadata(AVFormatContext *s, int idx)
         os->new_metadata = av_packet_pack_dictionary(st->metadata, &os->new_metadata_size);
     /* Send an empty dictionary to indicate that metadata has been cleared. */
     } else {
-        os->new_metadata = av_malloc(1);
+        os->new_metadata = av_mallocz(1);
         os->new_metadata_size = 0;
     }
 
@@ -385,7 +385,12 @@ static int vorbis_header(AVFormatContext *s, int idx)
             }
         }
     } else {
-        int ret = fixup_vorbis_headers(s, priv, &st->codecpar->extradata);
+        int ret;
+
+        if (priv->vp)
+             return AVERROR_INVALIDDATA;
+
+        ret = fixup_vorbis_headers(s, priv, &st->codecpar->extradata);
         if (ret < 0) {
             st->codecpar->extradata_size = 0;
             return ret;