Commit 20a575fd authored by ramiro's avatar ramiro

mlp: support bit-depths greater than 16 by default.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16026 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent a269a24e
...@@ -251,11 +251,11 @@ static int mlp_parse(AVCodecParserContext *s, ...@@ -251,11 +251,11 @@ static int mlp_parse(AVCodecParserContext *s,
if (ff_mlp_read_major_sync(avctx, &mh, &gb) < 0) if (ff_mlp_read_major_sync(avctx, &mh, &gb) < 0)
goto lost_sync; goto lost_sync;
#ifdef CONFIG_AUDIO_NONSHORT
avctx->bits_per_raw_sample = mh.group1_bits; avctx->bits_per_raw_sample = mh.group1_bits;
if (avctx->bits_per_raw_sample > 16) if (avctx->bits_per_raw_sample > 16)
avctx->sample_fmt = SAMPLE_FMT_S32; avctx->sample_fmt = SAMPLE_FMT_S32;
#endif else
avctx->sample_fmt = SAMPLE_FMT_S16;
avctx->sample_rate = mh.group1_samplerate; avctx->sample_rate = mh.group1_samplerate;
avctx->frame_size = mh.access_unit_size; avctx->frame_size = mh.access_unit_size;
......
...@@ -222,7 +222,7 @@ static av_cold int mlp_decode_init(AVCodecContext *avctx) ...@@ -222,7 +222,7 @@ static av_cold int mlp_decode_init(AVCodecContext *avctx)
m->avctx = avctx; m->avctx = avctx;
for (substr = 0; substr < MAX_SUBSTREAMS; substr++) for (substr = 0; substr < MAX_SUBSTREAMS; substr++)
m->substream[substr].lossless_check_data = 0xffffffff; m->substream[substr].lossless_check_data = 0xffffffff;
avctx->sample_fmt = SAMPLE_FMT_S16;
return 0; return 0;
} }
...@@ -296,12 +296,12 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) ...@@ -296,12 +296,12 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
m->avctx->sample_rate = mh.group1_samplerate; m->avctx->sample_rate = mh.group1_samplerate;
m->avctx->frame_size = mh.access_unit_size; m->avctx->frame_size = mh.access_unit_size;
#ifdef CONFIG_AUDIO_NONSHORT
m->avctx->bits_per_raw_sample = mh.group1_bits; m->avctx->bits_per_raw_sample = mh.group1_bits;
if (mh.group1_bits > 16) { if (mh.group1_bits > 16) {
m->avctx->sample_fmt = SAMPLE_FMT_S32; m->avctx->sample_fmt = SAMPLE_FMT_S32;
} }
#endif else
m->avctx->sample_fmt = SAMPLE_FMT_S16;
m->params_valid = 1; m->params_valid = 1;
for (substr = 0; substr < MAX_SUBSTREAMS; substr++) for (substr = 0; substr < MAX_SUBSTREAMS; substr++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment