summaryrefslogtreecommitdiff
path: root/libavformat/oggparsevorbis.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-10 20:58:15 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-10 20:59:55 +0100
commit6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 (patch)
tree0c2ec8349ff1763d5f48454b8b9f26374dbd80b0 /libavformat/oggparsevorbis.c
parent60b75186b2c878b6257b43c8fcc0b1356ada218e (diff)
parent9200514ad8717c63f82101dc394f4378854325bf (diff)
Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/oggparsevorbis.c')
-rw-r--r--libavformat/oggparsevorbis.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index b96be98974..a8cd6c9f97 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -335,14 +335,14 @@ static int vorbis_header(AVFormatContext *s, int idx)
return AVERROR_INVALIDDATA;
channels = bytestream_get_byte(&p);
- if (st->codec->channels && channels != st->codec->channels) {
+ if (st->codecpar->channels && channels != st->codecpar->channels) {
av_log(s, AV_LOG_ERROR, "Channel change is not supported\n");
return AVERROR_PATCHWELCOME;
}
- st->codec->channels = channels;
+ st->codecpar->channels = channels;
srate = bytestream_get_le32(&p);
p += 4; // skip maximum bitrate
- st->codec->bit_rate = bytestream_get_le32(&p); // nominal bitrate
+ st->codecpar->bit_rate = bytestream_get_le32(&p); // nominal bitrate
p += 4; // skip minimum bitrate
blocksize = bytestream_get_byte(&p);
@@ -357,11 +357,11 @@ static int vorbis_header(AVFormatContext *s, int idx)
if (bytestream_get_byte(&p) != 1) /* framing_flag */
return AVERROR_INVALIDDATA;
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = AV_CODEC_ID_VORBIS;
+ st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codecpar->codec_id = AV_CODEC_ID_VORBIS;
if (srate > 0) {
- st->codec->sample_rate = srate;
+ st->codecpar->sample_rate = srate;
avpriv_set_pts_info(st, 64, 1, srate);
}
} else if (os->buf[os->pstart] == 3) {
@@ -381,17 +381,17 @@ static int vorbis_header(AVFormatContext *s, int idx)
}
}
} else {
- int ret = fixup_vorbis_headers(s, priv, &st->codec->extradata);
+ int ret = fixup_vorbis_headers(s, priv, &st->codecpar->extradata);
if (ret < 0) {
- st->codec->extradata_size = 0;
+ st->codecpar->extradata_size = 0;
return ret;
}
- st->codec->extradata_size = ret;
+ st->codecpar->extradata_size = ret;
- priv->vp = av_vorbis_parse_init(st->codec->extradata, st->codec->extradata_size);
+ priv->vp = av_vorbis_parse_init(st->codecpar->extradata, st->codecpar->extradata_size);
if (!priv->vp) {
- av_freep(&st->codec->extradata);
- st->codec->extradata_size = 0;
+ av_freep(&st->codecpar->extradata);
+ st->codecpar->extradata_size = 0;
return AVERROR_UNKNOWN;
}
}