[vlc-devel] commit: h264: fix maximum size calculation ( Rafaël Carré )

git version control git at videolan.org
Mon Mar 31 12:09:23 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Mar 31 09:53:56 2008 +0200| [cf34ca7b9307806bedb90f37e40e03de8a84e35b]

h264: fix maximum size calculation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf34ca7b9307806bedb90f37e40e03de8a84e35b
---

 modules/packetizer/h264.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index aa68af0..ded2c91 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -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;




More information about the vlc-devel mailing list