flacdec: factor out code setting avctx->sample_fmt