Lines Matching refs:par
61 static void parse_waveformatex(AVFormatContext *s, AVIOContext *pb, AVCodecParameters *par)
69 par->bits_per_coded_sample = bps;
72 av_channel_layout_from_mask(&par->ch_layout, mask);
81 par->codec_tag = AV_RL32(subformat);
82 par->codec_id = ff_wav_codec_get_id(par->codec_tag,
83 par->bits_per_coded_sample);
85 par->codec_id = ff_codec_guid_get_id(ff_codec_wav_guids, subformat);
86 if (!par->codec_id)
95 AVCodecParameters *par, int size, int big_endian)
105 av_channel_layout_uninit(&par->ch_layout);
107 par->codec_type = AVMEDIA_TYPE_AUDIO;
112 par->sample_rate = avio_rl32(pb);
114 par->block_align = avio_rl16(pb);
119 par->sample_rate = avio_rb32(pb);
121 par->block_align = avio_rb16(pb);
124 par->bits_per_coded_sample = 8;
127 par->bits_per_coded_sample = avio_rl16(pb);
129 par->bits_per_coded_sample = avio_rb16(pb);
133 par->codec_tag = 0;
135 par->codec_tag = id;
136 par->codec_id = ff_wav_codec_get_id(id,
137 par->bits_per_coded_sample);
148 parse_waveformatex(s, pb, par);
153 if (ff_get_extradata(s, par, pb, cbSize) < 0)
165 if (ff_get_extradata(s, par, pb, size) < 0)
167 nb_streams = AV_RL16(par->extradata + 4);
168 par->sample_rate = AV_RL32(par->extradata + 12);
174 channels += par->extradata[8 + i * 20 + 17];
177 par->bit_rate = bitrate;
179 if (par->sample_rate <= 0) {
181 "Invalid sample rate: %d\n", par->sample_rate);
184 if (par->codec_id == AV_CODEC_ID_AAC_LATM) {
188 par->sample_rate = 0;
191 if (par->codec_id == AV_CODEC_ID_ADPCM_G726 && par->sample_rate)
192 par->bits_per_coded_sample = par->bit_rate / par->sample_rate;
195 if (channels != par->ch_layout.nb_channels) {
196 av_channel_layout_uninit(&par->ch_layout);
197 par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
198 par->ch_layout.nb_channels = channels;