Ensure we request s16 samples.

We won't get these for atrac3+, but we should for atrac3 (seems to be the
default anyway, but better to be clear.)
This commit is contained in:
Unknown W. Brackets 2014-10-03 20:05:08 -07:00
parent 24ab84a0fe
commit 2f443f52a6

View file

@ -1255,6 +1255,7 @@ int __AtracSetContext(Atrac *atrac) {
atrac->pCodecCtx->channel_layout = AV_CH_LAYOUT_MONO;
// open codec
atrac->pCodecCtx->request_sample_fmt = AV_SAMPLE_FMT_S16;
if ((ret = avcodec_open2(atrac->pCodecCtx, pCodec, NULL)) < 0) {
ERROR_LOG(ME, "avcodec_open2: Cannot open audio decoder %d", ret);
return -1;