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)
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;