Unified · Split
| @@ -279,16 +279,15 @@ static av_cold av_unused int pcm_scale_decode_init(AVCodecContext *avctx) · 278 unmodified lines | |||
| 279 | avctx->sample_fmt = AV_SAMPLE_FMT_FLT; | 279 | avctx->sample_fmt = AV_SAMPLE_FMT_FLT; |
| 280 | s->base.sample_size = 4; | 280 | s->base.sample_size = 4; |
| 281 | 281 | ||
| 282 | if (avctx->bits_per_coded_sample < 1 || avctx->bits_per_coded_sample > 24) | 282 | if (avctx->bits_per_coded_sample < 1 || avctx->bits_per_coded_sample > 24) |
| 283 | return AVERROR_INVALIDDATA; | 283 | return AVERROR_INVALIDDATA; |
| 284 | 284 | ||
| 285 | s->scale = 1. / (1 << (avctx->bits_per_coded_sample - 1)); | 285 | s->scale = 1. / (1 << (avctx->bits_per_coded_sample - 1)); |
| 286 | fdsp = avpriv_float_dsp_alloc(0); | 286 | fdsp = avpriv_float_dsp_alloc(0); |
| 287 | if (!fdsp) | 287 | if (!fdsp) |
| 288 | return AVERROR(ENOMEM); | 288 | return AVERROR(ENOMEM); |
| 289 | s->vector_fmul_scalar = fdsp->vector_fmul_scalar; | 289 | s->vector_fmul_scalar = fdsp->vector_fmul_scalar; |
| 290 | av_free(fdsp); | 290 | av_free(fdsp); |
| 291 | |||
| 292 | 291 | ||
| 293 | return 0; | 292 | return 0; |
| 294 | } | 293 | } |