[vlc-commits] packetizer: h264: fix comparison and add references

Francois Cartegnie git at videolan.org
Thu Aug 6 14:02:52 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Aug  6 13:57:53 2015 +0200| [bda3c499e58acae508b8daaccd96304cb90253c1] | committer: Francois Cartegnie

packetizer: h264: fix comparison and add references

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

 modules/packetizer/h264.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 6512665..eb832c0 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -1054,17 +1054,18 @@ static void ParseSei( decoder_t *p_dec, block_t *p_frag )
         /* Look for user_data_registered_itu_t_t35 */
         if( i_type == SEI_USER_DATA_REGISTERED_ITU_T_T35 )
         {
-            static const uint8_t p_dvb1_data_start_code[] = {
-                0xb5,
-                0x00, 0x31,
-                0x47, 0x41, 0x39, 0x34
+            /* TS 101 154 Auxiliary Data and H264/AVC video */
+            static const uint8_t p_DVB1_data_start_code[] = {
+                0xb5, /* United States */
+                0x00, 0x31, /* US provider code */
+                0x47, 0x41, 0x39, 0x34 /* user identifier */
             };
-            const int      i_t35 = i_size;
+            const unsigned i_t35 = i_size;
             const uint8_t *p_t35 = &pb_dec[i_used];
 
             /* Check for we have DVB1_data() */
-            if( i_t35 >= 5 &&
-                !memcmp( p_t35, p_dvb1_data_start_code, sizeof(p_dvb1_data_start_code) ) )
+            if( i_t35 >= sizeof(p_DVB1_data_start_code) &&
+                !memcmp( p_t35, p_DVB1_data_start_code, sizeof(p_DVB1_data_start_code) ) )
             {
                 cc_Extract( &p_sys->cc_next, true, &p_t35[3], i_t35 - 3 );
             }



More information about the vlc-commits mailing list