| 145 | }; |
| 146 | |
| 147 | static 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 | |
| 168 | static void set_sample_rate_params(AVCodecContext *avctx) |
| 169 | { |
no test coverage detected