[vlc-commits] packetizer: h264: fix incomplete sei skip
Francois Cartegnie
git at videolan.org
Mon Dec 21 14:33:32 CET 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Dec 21 14:28:25 2015 +0100| [76a84e0df2229f04318a0b055adbbe856b73c927] | committer: Francois Cartegnie
packetizer: h264: fix incomplete sei skip
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=76a84e0df2229f04318a0b055adbbe856b73c927
---
modules/packetizer/h264.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index cefa9ee..69efc61 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -1028,8 +1028,11 @@ static void ParseSei( decoder_t *p_dec, block_t *p_frag )
break;
}
+ const unsigned i_end_bit_pos = bs_pos( &s );
/* Skip unsparsed content */
- bs_skip( &s, i_size * 8 - i_start_bit_pos );
+ if( i_end_bit_pos - i_start_bit_pos > i_size * 8 ) /* Something went wrong with _ue reads */
+ break;
+ bs_skip( &s, i_size * 8 - ( i_end_bit_pos - i_start_bit_pos ) );
}
}
More information about the vlc-commits
mailing list