[vlc-devel] commit: Added 2 asserts. (Laurent Aimar )

git version control git at videolan.org
Sat Nov 15 13:12:02 CET 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Nov 15 13:02:55 2008 +0100| [7c593a9a7f927a9624f1d59d97d98c902b469c1f] | committer: Laurent Aimar 

Added 2 asserts.

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

 modules/mux/mpeg/pes.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/mux/mpeg/pes.c b/modules/mux/mpeg/pes.c
index 7198a4d..50d668a 100644
--- a/modules/mux/mpeg/pes.c
+++ b/modules/mux/mpeg/pes.c
@@ -283,6 +283,9 @@ int  EStoPES ( sout_instance_t *p_sout, block_t **pp_pes, block_t *p_es,
 
     int     i_pes_count = 1;
 
+    assert( i_max_pes_size >= 0 );
+    assert( i_header_size >= 0 );
+
     /* NB, Only video ES may have unbounded length */
     if( !i_max_pes_size ||
         ( p_fmt->i_cat != VIDEO_ES && i_max_pes_size > PES_PAYLOAD_SIZE_MAX ) )




More information about the vlc-devel mailing list