Commit 698c8900 authored by Laurent Aimar's avatar Laurent Aimar

Made sure that our output buffer is large enough with TTA.

It allows playing multi-channels TTA and fixed a segfault as the decoder
does not check for sufficient space.
parent 9139b342
......@@ -186,6 +186,11 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
case CODEC_ID_WAVPACK:
p_sys->i_output_max = 8 * sizeof(int32_t) * 131072;
break;
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 4, 0 )
case CODEC_ID_TTA:
p_sys->i_output_max = p_sys->p_context->channels * sizeof(int32_t) * p_sys->p_context->sample_rate * 2;
break;
#endif
case CODEC_ID_FLAC:
p_sys->i_output_max = 8 * sizeof(int32_t) * 65535;
......
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