Commit 2ff3b97b authored by Rafaël Carré's avatar Rafaël Carré

avcodec audio decoder: bump arbitrary decoded frame size limit

The limit can be reached with some WMA samples:
[wmav2 @ 0x7f9c50c1e960] output buffer size is too small for the current frame (192000 < 196608)

TODO: port to avcodec_decode_audio4
parent a809edef
......@@ -181,8 +181,8 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
p_sys->i_output_max = 0;
break;
}
if( p_sys->i_output_max < AVCODEC_MAX_AUDIO_FRAME_SIZE )
p_sys->i_output_max = AVCODEC_MAX_AUDIO_FRAME_SIZE;
if( p_sys->i_output_max < 2 * AVCODEC_MAX_AUDIO_FRAME_SIZE )
p_sys->i_output_max = 2 * AVCODEC_MAX_AUDIO_FRAME_SIZE;
msg_Dbg( p_dec, "Using %d bytes output buffer", p_sys->i_output_max );
p_sys->p_output = av_malloc( p_sys->i_output_max );
......
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