MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / set_bps_params

Function set_bps_params

libavcodec/takdec.c:147–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145};
146
147static int set_bps_params(AVCodecContext *avctx)
148{
149 switch (avctx->bits_per_raw_sample) {
150 case 8:
151 avctx->sample_fmt = AV_SAMPLE_FMT_U8P;
152 break;
153 case 16:
154 avctx->sample_fmt = AV_SAMPLE_FMT_S16P;
155 break;
156 case 24:
157 avctx->sample_fmt = AV_SAMPLE_FMT_S32P;
158 break;
159 default:
160 av_log(avctx, AV_LOG_ERROR, "invalid/unsupported bits per sample: %d\n",
161 avctx->bits_per_raw_sample);
162 return AVERROR_INVALIDDATA;
163 }
164
165 return 0;
166}
167
168static void set_sample_rate_params(AVCodecContext *avctx)
169{

Callers 2

tak_decode_initFunction · 0.85
tak_decode_frameFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected