Commit c18dbcc9 authored by David Flynn's avatar David Flynn Committed by Antoine Cellerier

Fix divide by 0 when repacketizing a Flac stream of known rate

Before setting end_date, remember to initialize the divider for future
calculations.
Signed-off-by: default avatarDavid Flynn <davidf@rd.bbc.co.uk>
Signed-off-by: default avatarAntoine Cellerier <dionoea@videolan.org>
parent 19b7dc4c
......@@ -408,6 +408,8 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block )
else if( !aout_DateGet( &p_sys->end_date ) )
{
/* The first PTS is as good as anything else. */
p_sys->i_rate = p_dec->fmt_out.audio.i_rate;
aout_DateInit( &p_sys->end_date, p_sys->i_rate );
aout_DateSet( &p_sys->end_date, (*pp_block)->i_pts );
}
......
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