Commit 86d56b11 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

MLP packetizer: avoid SIGFPE with samplerate of 0

(cherry picked from commit ad1bc94879755bc7bf10638ef9e8b2d2ff895a44)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent fcc89438
......@@ -294,10 +294,13 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
msg_Info( p_dec, "MLP channels: %d samplerate: %d",
p_sys->mlp.i_channels, p_sys->mlp.i_rate );
if( p_sys->mlp.i_rate > 0 )
{
const mtime_t i_end_date = date_Get( &p_sys->end_date );
date_Init( &p_sys->end_date, p_sys->mlp.i_rate, 1 );
date_Set( &p_sys->end_date, i_end_date );
}
}
p_dec->fmt_out.audio.i_rate = p_sys->mlp.i_rate;
p_dec->fmt_out.audio.i_channels = p_sys->mlp.i_channels;
......
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