]> git.sesse.net Git - vlc/commitdiff
date_Decrement: change assert so it doesn't to funky stuff
authorIlkka Ollakka <ileoo@videolan.org>
Wed, 11 Dec 2013 07:02:49 +0000 (09:02 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Sat, 4 Jan 2014 12:37:32 +0000 (14:37 +0200)
If we do date_Set and right after that date_Decrement that assert
seemed to behave differently in 64bit and 32bit architectures.

Ref #9022, #10101

src/misc/mtime.c

index 4bc2db2c07f3807350d8168326849162348e18ea..62409edd6b944bc7beb359c5b96f2c9c73e41845 100644 (file)
@@ -217,7 +217,7 @@ mtime_t date_Decrement( date_t *p_date, uint32_t i_nb_samples )
     if( p_date->i_remainder < i_rem_adjust )
     {
         /* This is Bresenham algorithm. */
-        assert( p_date->i_remainder > -p_date->i_divider_num);
+        assert( p_date->i_remainder p_date->i_divider_num);
         p_date->date -= 1;
         p_date->i_remainder += p_date->i_divider_num;
     }