Revision 01f4895c libavformat/oggparsevorbis.c

View differences:

libavformat/oggparsevorbis.c
178 178
    memcpy(priv->packet[os->seq], os->buf + os->pstart, os->psize);
179 179
    if (os->buf[os->pstart] == 1) {
180 180
        uint8_t *p = os->buf + os->pstart + 11; //skip up to the audio channels
181
        st->codec.channels = *p++;
182
        st->codec.sample_rate = le2me_32 (unaligned32 (p));
181
        st->codec->channels = *p++;
182
        st->codec->sample_rate = le2me_32 (unaligned32 (p));
183 183
        p += 8; //skip maximum and and nominal bitrate
184
        st->codec.bit_rate = le2me_32 (unaligned32 (p)); //Minimum bitrate
184
        st->codec->bit_rate = le2me_32 (unaligned32 (p)); //Minimum bitrate
185 185

  
186
        st->codec.codec_type = CODEC_TYPE_AUDIO;
187
        st->codec.codec_id = CODEC_ID_VORBIS;
186
        st->codec->codec_type = CODEC_TYPE_AUDIO;
187
        st->codec->codec_id = CODEC_ID_VORBIS;
188 188

  
189 189
    } else if (os->buf[os->pstart] == 3) {
190 190
        vorbis_comment (s, os->buf + os->pstart + 7, os->psize - 8);
191 191
    } else {
192
        st->codec.extradata_size =
193
            fixup_vorbis_headers(s, priv, &st->codec.extradata);
192
        st->codec->extradata_size =
193
            fixup_vorbis_headers(s, priv, &st->codec->extradata);
194 194
    }
195 195

  
196 196
    return os->seq < 3;

Also available in: Unified diff