Commit 0b2d112a authored by Laurent Aimar's avatar Laurent Aimar

Do not assert on non 0 divider in aout_DateInit.

A lot of codecs do init it to 0 and fix it later.
parent 089089ca
......@@ -479,7 +479,6 @@ void aout_FifoDestroy( aout_instance_t * p_aout, aout_fifo_t * p_fifo )
*****************************************************************************/
void aout_DateInit( audio_date_t * p_date, uint32_t i_divider )
{
assert (i_divider);
p_date->date = 0;
p_date->i_divider = i_divider;
p_date->i_remainder = 0;
......@@ -517,7 +516,7 @@ mtime_t aout_DateGet( const audio_date_t * p_date )
mtime_t aout_DateIncrement( audio_date_t * p_date, uint32_t i_nb_samples )
{
mtime_t i_dividend = INT64_C(1000000) * i_nb_samples;
assert (p_date->i_divider); /* uninitialized audio_data_t ? */
assert( p_date->i_divider > 0 ); /* uninitialized audio_data_t ? */
p_date->date += i_dividend / p_date->i_divider;
p_date->i_remainder += (int)(i_dividend % p_date->i_divider);
if ( p_date->i_remainder >= p_date->i_divider )
......
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