Commit 15f7406e authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

ogg: Fix a divide by zero.

Please review.

Spotted by llvm/clang checker.
parent e903b2ff
...@@ -872,6 +872,9 @@ static void OggSetDate( block_t *p_og, mtime_t i_dts, mtime_t i_length ) ...@@ -872,6 +872,9 @@ static void OggSetDate( block_t *p_og, mtime_t i_dts, mtime_t i_length )
{ {
i_count++; i_count++;
} }
if( i_count == 0 ) return; /* ignore. */
i_delta = i_length / i_count; i_delta = i_length / i_count;
for( p_tmp = p_og; p_tmp != NULL; p_tmp = p_tmp->p_next ) for( p_tmp = p_og; p_tmp != NULL; p_tmp = p_tmp->p_next )
......
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