aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/flacdec.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/flacdec.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/flacdec.c')
-rw-r--r--libavformat/flacdec.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index eb92216c45..19f10629c5 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -52,8 +52,8 @@ static int flac_read_header(AVFormatContext *s)
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = AV_CODEC_ID_FLAC;
+ st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
+ st->codecpar->codec_id = AV_CODEC_ID_FLAC;
st->need_parsing = AVSTREAM_PARSE_FULL_RAW;
/* the parameters will be extracted from the compressed bitstream */
@@ -102,14 +102,14 @@ static int flac_read_header(AVFormatContext *s)
RETURN_ERROR(AVERROR_INVALIDDATA);
}
found_streaminfo = 1;
- st->codec->extradata = buffer;
- st->codec->extradata_size = metadata_size;
+ st->codecpar->extradata = buffer;
+ st->codecpar->extradata_size = metadata_size;
buffer = NULL;
/* get sample rate and sample count from STREAMINFO header;
* other parameters will be extracted by the parser */
- samplerate = AV_RB24(st->codec->extradata + 10) >> 4;
- samples = (AV_RB64(st->codec->extradata + 13) >> 24) & ((1ULL << 36) - 1);
+ samplerate = AV_RB24(st->codecpar->extradata + 10) >> 4;
+ samples = (AV_RB64(st->codecpar->extradata + 13) >> 24) & ((1ULL << 36) - 1);
/* set time base and duration */
if (samplerate > 0) {
@@ -189,7 +189,7 @@ static int flac_read_header(AVFormatContext *s)
av_log(s, AV_LOG_WARNING,
"Invalid value of WAVEFORMATEXTENSIBLE_CHANNEL_MASK\n");
} else {
- st->codec->channel_layout = mask;
+ st->codecpar->channel_layout = mask;
av_dict_set(&s->metadata, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", NULL, 0);
}
}
@@ -248,7 +248,7 @@ static av_unused int64_t flac_read_timestamp(AVFormatContext *s, int stream_inde
return AV_NOPTS_VALUE;
av_init_packet(&pkt);
- parser = av_parser_init(st->codec->codec_id);
+ parser = av_parser_init(st->codecpar->codec_id);
if (!parser){
return AV_NOPTS_VALUE;
}
@@ -263,7 +263,7 @@ static av_unused int64_t flac_read_timestamp(AVFormatContext *s, int stream_inde
break;
}
av_init_packet(&out_pkt);
- av_parser_parse2(parser, st->codec,
+ av_parser_parse2(parser, st->internal->avctx,
&out_pkt.data, &out_pkt.size, pkt.data, pkt.size,
pkt.pts, pkt.dts, *ppos);