[vlc-commits] packetizer: h264: fix CreateRbspFromNAL argument type
Francois Cartegnie
git at videolan.org
Thu Dec 3 20:18:33 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 3 20:16:59 2015 +0100| [885932e3d952fad269ad404bcd493d21f93403c2] | committer: Francois Cartegnie
packetizer: h264: fix CreateRbspFromNAL argument type
and possibly uninitialized
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=885932e3d952fad269ad404bcd493d21f93403c2
---
modules/packetizer/h264.c | 6 +++---
modules/packetizer/h264_nal.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index 0d616d1..cff9bc2 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -896,7 +896,7 @@ static void ParseSlice( decoder_t *p_dec, bool *pb_new_picture, slice_t *p_slice
{
decoder_sys_t *p_sys = p_dec->p_sys;
uint8_t *pb_dec;
- int i_dec;
+ size_t i_dec = 0;
int i_slice_type;
slice_t slice;
bs_t s;
@@ -1005,7 +1005,7 @@ static void ParseSei( decoder_t *p_dec, block_t *p_frag )
{
decoder_sys_t *p_sys = p_dec->p_sys;
uint8_t *pb_dec;
- int i_dec;
+ size_t i_dec = 0;
/* */
CreateRbspFromNAL( &pb_dec, &i_dec, &p_frag->p_buffer[5], p_frag->i_buffer - 5 );
@@ -1013,7 +1013,7 @@ static void ParseSei( decoder_t *p_dec, block_t *p_frag )
return;
/* The +1 is for rbsp trailing bits */
- for( int i_used = 0; i_used+1 < i_dec; )
+ for( size_t i_used = 0; i_used+1 < i_dec; )
{
/* Read type */
int i_type = 0;
diff --git a/modules/packetizer/h264_nal.h b/modules/packetizer/h264_nal.h
index 3f94092..db1dcc6 100644
--- a/modules/packetizer/h264_nal.h
+++ b/modules/packetizer/h264_nal.h
@@ -107,7 +107,7 @@ struct nal_pps
int i_pic_order_present_flag;
};
-static inline void CreateRbspFromNAL( uint8_t **pp_ret, int *pi_ret,
+static inline void CreateRbspFromNAL( uint8_t **pp_ret, size_t *pi_ret,
const uint8_t *src, int i_src )
{
uint8_t *dst = malloc( i_src );
More information about the vlc-commits
mailing list