h264: fix maximum size calculation
authorRafaël Carré <funman@videolan.org>
Mon, 31 Mar 2008 07:53:56 +0000 (09:53 +0200)
committerJean-Paul Saman <jpsaman@videolan.org>
Mon, 31 Mar 2008 08:17:53 +0000 (10:17 +0200)
modules/packetizer/h264.c

index aa68af0..ded2c91 100644 (file)
@@ -448,7 +448,7 @@ static block_t *PacketizeAVC1( decoder_t *p_dec, block_t **pp_block )
         }
 
         if( i_size <= 0 ||
-            i_size >= ( p - p_block->p_buffer + p_block->i_buffer ) )
+            i_size > ( p_block->p_buffer + p_block->i_buffer - p ) )
         {
             msg_Err( p_dec, "Broken frame : size %d is too big", i_size );
             break;