• Home
  • Raw
  • Download

Lines Matching refs:par

59     AVCodecParameters *par;  in rsd_read_header()  local
68 par = st->codecpar; in rsd_read_header()
69 par->codec_type = AVMEDIA_TYPE_AUDIO; in rsd_read_header()
70 par->codec_tag = avio_rl32(pb); in rsd_read_header()
71 par->codec_id = ff_codec_get_id(rsd_tags, par->codec_tag); in rsd_read_header()
72 if (!par->codec_id) { in rsd_read_header()
73 const char *tag_buf = av_fourcc2str(par->codec_tag); in rsd_read_header()
75 if (par->codec_tag == rsd_unsupported_tags[i]) { in rsd_read_header()
84 par->channels = avio_rl32(pb); in rsd_read_header()
85 if (par->channels <= 0 || par->channels > INT_MAX / 36) { in rsd_read_header()
86 av_log(s, AV_LOG_ERROR, "Invalid number of channels: %d\n", par->channels); in rsd_read_header()
91 par->sample_rate = avio_rl32(pb); in rsd_read_header()
92 if (!par->sample_rate) in rsd_read_header()
97 switch (par->codec_id) { in rsd_read_header()
99 par->block_align = 2048; in rsd_read_header()
100 if ((ret = ff_alloc_extradata(par, 34)) < 0) in rsd_read_header()
102 memset(par->extradata, 0, 34); in rsd_read_header()
105 par->block_align = 16 * par->channels; in rsd_read_header()
108 par->block_align = 20 * par->channels; in rsd_read_header()
114 par->bits_per_coded_sample = 4; in rsd_read_header()
115 par->block_align = 36 * par->channels; in rsd_read_header()
123 if ((ret = ff_get_extradata(s, par, s->pb, 32)) < 0) in rsd_read_header()
127 par->block_align = 8 * par->channels; in rsd_read_header()
130 if ((ret = ff_alloc_extradata(st->codecpar, 32 * par->channels)) < 0) in rsd_read_header()
133 for (i = 0; i < par->channels; i++) { in rsd_read_header()
154 switch (par->codec_id) { in rsd_read_header()
159 st->duration = av_get_audio_frame_duration2(par, remaining - start); in rsd_read_header()
162 st->duration = (remaining - start) / (8 * par->channels) * 14; in rsd_read_header()
166 st->duration = (remaining - start) / 2 / par->channels; in rsd_read_header()
171 if (par->codec_id == AV_CODEC_ID_XMA2) { in rsd_read_header()
176 avpriv_set_pts_info(st, 64, 1, par->sample_rate); in rsd_read_header()
183 AVCodecParameters *par = s->streams[0]->codecpar; in rsd_read_packet() local
191 if (par->codec_id == AV_CODEC_ID_ADPCM_IMA_RAD || in rsd_read_packet()
192 par->codec_id == AV_CODEC_ID_ADPCM_PSX || in rsd_read_packet()
193 par->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV || in rsd_read_packet()
194 par->codec_id == AV_CODEC_ID_XMA2) { in rsd_read_packet()
195 ret = av_get_packet(s->pb, pkt, par->block_align); in rsd_read_packet()
196 } else if (par->codec_tag == MKTAG('W','A','D','P') && in rsd_read_packet()
197 par->channels > 1) { in rsd_read_packet()
200 ret = av_new_packet(pkt, par->block_align); in rsd_read_packet()
204 for (ch = 0; ch < par->channels; ch++) { in rsd_read_packet()
214 if (par->codec_id == AV_CODEC_ID_XMA2 && pkt->size >= 1) in rsd_read_packet()