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

Hugo Beauzée-Luyssen git at videolan.org
Sat Apr 21 19:43:54 CEST 2012


vlc/vlc-2.0 | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Tue Apr 17 12:35:12 2012 +0200| [2da9586d6ec9614f7f7449cf5281c19e7e211aa0] | committer: Jean-Baptiste Kempf

h264 packetizer: Check for negative sps.
(cherry picked from commit 09c2cc894e84a02326e382413f11b88b3c9c15e6)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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