X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Foggparsevorbis.c;h=38eb4b0b1c80c6f2cce15a230b08a2aff94d6ea9;hb=b615dbb319fc1748af6ea0ac95b5f89e03c5de0e;hp=78defd703d7a21efe7c1c0dd613c7b168359b327;hpb=31f3c94760b42e16e998dcc0b34e677d1aa431bc;p=ffmpeg diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 78defd703d7..38eb4b0b1c8 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -203,12 +203,12 @@ vorbis_header (AVFormatContext * s, int idx) int pkt_type = os->buf[os->pstart]; if (!(pkt_type & 1)) - return 0; + return os->private ? 0 : -1; if (!os->private) { os->private = av_mallocz(sizeof(struct oggvorbis_private)); if (!os->private) - return 0; + return -1; } if (os->psize < 1 || pkt_type > 5) @@ -256,7 +256,7 @@ vorbis_header (AVFormatContext * s, int idx) return -1; st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - st->codec->codec_id = CODEC_ID_VORBIS; + st->codec->codec_id = AV_CODEC_ID_VORBIS; if (srate > 0) { st->codec->sample_rate = srate;