]> granicus.if.org Git - handbrake/commitdiff
Make MULTIPLE_MOD handle mod 1 correctly
authorjstebbins <jstebbins.hb@gmail.com>
Mon, 13 Apr 2009 18:03:32 +0000 (18:03 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Mon, 13 Apr 2009 18:03:32 +0000 (18:03 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2323 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/common.h

index 19b8d221792c1462584f51f69c0ee78cbec0c35e..1fa3d4fe104f38b1264fec90e2da9d2945002eea 100644 (file)
@@ -27,7 +27,7 @@
 
 #define EVEN( a )        ( (a) + ( (a) & 1 ) )
 #define MULTIPLE_16( a ) ( 16 * ( ( (a) + 8 ) / 16 ) )
-#define MULTIPLE_MOD( a, b ) ( b * ( ( (a) + (b / 2) - 1) / b ) )
+#define MULTIPLE_MOD( a, b ) ((b==1)?a:( b * ( ( (a) + (b / 2) - 1) / b ) ))
 
 #define HB_DVD_READ_BUFFER_SIZE 2048