Lines Matching defs:avctx

50 int ff_flac_decode_frame_header(AVCodecContext *avctx, GetBitContext *gb,
57 av_log(avctx, AV_LOG_ERROR + log_level_offset, "invalid sync code\n");
77 av_log(avctx, AV_LOG_ERROR + log_level_offset,
85 av_log(avctx, AV_LOG_ERROR + log_level_offset,
94 av_log(avctx, AV_LOG_ERROR + log_level_offset,
102 av_log(avctx, AV_LOG_ERROR + log_level_offset,
109 av_log(avctx, AV_LOG_ERROR + log_level_offset,
130 av_log(avctx, AV_LOG_ERROR + log_level_offset,
140 av_log(avctx, AV_LOG_ERROR + log_level_offset,
169 int ff_flac_is_extradata_valid(AVCodecContext *avctx,
173 if (!avctx->extradata || avctx->extradata_size < FLAC_STREAMINFO_SIZE) {
174 av_log(avctx, AV_LOG_ERROR, "extradata NULL or too small.\n");
177 if (AV_RL32(avctx->extradata) != MKTAG('f','L','a','C')) {
179 if (avctx->extradata_size != FLAC_STREAMINFO_SIZE) {
180 av_log(avctx, AV_LOG_WARNING, "extradata contains %d bytes too many.\n",
181 FLAC_STREAMINFO_SIZE-avctx->extradata_size);
184 *streaminfo_start = avctx->extradata;
186 if (avctx->extradata_size < 8+FLAC_STREAMINFO_SIZE) {
187 av_log(avctx, AV_LOG_ERROR, "extradata too small.\n");
191 *streaminfo_start = &avctx->extradata[8];
196 void ff_flac_set_channel_layout(AVCodecContext *avctx, int channels)
198 if (channels == avctx->ch_layout.nb_channels &&
199 avctx->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC)
202 av_channel_layout_uninit(&avctx->ch_layout);
204 avctx->ch_layout = flac_channel_layouts[channels - 1];
206 avctx->ch_layout = (AVChannelLayout){ .order = AV_CHANNEL_ORDER_UNSPEC,
210 int ff_flac_parse_streaminfo(AVCodecContext *avctx, struct FLACStreaminfo *s,
219 av_log(avctx, AV_LOG_WARNING, "invalid max blocksize: %d\n",
233 av_log(avctx, AV_LOG_ERROR, "invalid bps: %d\n", s->bps);
238 avctx->sample_rate = s->samplerate;
239 avctx->bits_per_raw_sample = s->bps;
240 ff_flac_set_channel_layout(avctx, s->channels);