/* initialize based on the demuxer-supplied streamdata header */
ff_flac_parse_streaminfo(avctx, (FLACStreaminfo *)s, streaminfo);
+ if (s->bps > 16)
+ avctx->sample_fmt = SAMPLE_FMT_S32;
+ else
+ avctx->sample_fmt = SAMPLE_FMT_S16;
allocate_buffers(s);
s->got_streaminfo = 1;
avctx->channels = s->channels;
avctx->sample_rate = s->samplerate;
avctx->bits_per_raw_sample = s->bps;
- if (s->bps > 16)
- avctx->sample_fmt = SAMPLE_FMT_S32;
- else
- avctx->sample_fmt = SAMPLE_FMT_S16;
s->samples = get_bits_long(&gb, 32) << 4;
s->samples |= get_bits(&gb, 4);