[vlc-commits] h264 packetizer: Check for negative sps.

Hugo Beauzée-Luyssen git at videolan.org
Tue Apr 17 14:32:40 CEST 2012


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Apr 17 12:35:12 2012 +0200| [09c2cc894e84a02326e382413f11b88b3c9c15e6] | committer: Hugo Beauzée-Luyssen

h264 packetizer: Check for negative sps.

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

 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 3e27a68..a680454 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -820,7 +820,7 @@ static void PutSPS( decoder_t *p_dec, block_t *p_frag )
     p_dec->fmt_out.i_level = bs_read( &s, 8 );
     /* sps id */
     i_sps_id = bs_read_ue( &s );
-    if( i_sps_id >= SPS_MAX )
+    if( i_sps_id >= SPS_MAX || i_sps_id < 0 )
     {
         msg_Warn( p_dec, "invalid SPS (sps_id=%d)", i_sps_id );
         free( pb_dec );



More information about the vlc-commits mailing list