Commit a481fd69 authored by Rafaël Carré's avatar Rafaël Carré Committed by Jean-Baptiste Kempf

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)

(cherry picked from commit 2ff3b97ba534977e08c119204a977c44a20b00d7)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent c6403f56
......@@ -234,8 +234,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