aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpeg.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/mpeg.c
parent60b75186b2c878b6257b43c8fcc0b1356ada218e (diff)
parent9200514ad8717c63f82101dc394f4378854325bf (diff)
downloadffmpeg-6f69f7a8bf6a0d013985578df2ef42ee6b1c7994.tar.gz
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/mpeg.c')
-rw-r--r--libavformat/mpeg.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index 77d5cd10ab..c83c02681a 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -597,13 +597,13 @@ skip:
if (!st)
goto skip;
st->id = startcode;
- st->codec->codec_type = type;
- st->codec->codec_id = codec_id;
- if ( st->codec->codec_id == AV_CODEC_ID_PCM_MULAW
- || st->codec->codec_id == AV_CODEC_ID_PCM_ALAW) {
- st->codec->channels = 1;
- st->codec->channel_layout = AV_CH_LAYOUT_MONO;
- st->codec->sample_rate = 8000;
+ st->codecpar->codec_type = type;
+ st->codecpar->codec_id = codec_id;
+ if ( st->codecpar->codec_id == AV_CODEC_ID_PCM_MULAW
+ || st->codecpar->codec_id == AV_CODEC_ID_PCM_ALAW) {
+ st->codecpar->channels = 1;
+ st->codecpar->channel_layout = AV_CH_LAYOUT_MONO;
+ st->codecpar->sample_rate = 8000;
}
st->request_probe = request_probe;
st->need_parsing = AVSTREAM_PARSE_FULL;
@@ -612,7 +612,7 @@ found:
if (st->discard >= AVDISCARD_ALL)
goto skip;
if (startcode >= 0xa0 && startcode <= 0xaf) {
- if (st->codec->codec_id == AV_CODEC_ID_MLP) {
+ if (st->codecpar->codec_id == AV_CODEC_ID_MLP) {
if (len < 6)
goto skip;
avio_skip(s->pb, 6);
@@ -791,8 +791,8 @@ static int vobsub_read_header(AVFormatContext *s)
goto end;
}
st->id = stream_id;
- st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = AV_CODEC_ID_DVD_SUBTITLE;
+ st->codecpar->codec_type = AVMEDIA_TYPE_SUBTITLE;
+ st->codecpar->codec_id = AV_CODEC_ID_DVD_SUBTITLE;
avpriv_set_pts_info(st, 64, 1, 1000);
av_dict_set(&st->metadata, "language", id, 0);
if (alt[0])
@@ -869,8 +869,8 @@ static int vobsub_read_header(AVFormatContext *s)
av_bprint_finalize(&header, &header_str);
for (i = 0; i < s->nb_streams; i++) {
AVStream *sub_st = s->streams[i];
- sub_st->codec->extradata = av_strdup(header_str);
- sub_st->codec->extradata_size = header.len;
+ sub_st->codecpar->extradata = av_strdup(header_str);
+ sub_st->codecpar->extradata_size = header.len;
}
av_free(header_str);