diff options
Diffstat (limited to 'libavformat/flacdec.c')
-rw-r--r-- | libavformat/flacdec.c | 18 |
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); |