Add nal_reader_skip_long() helper function to allow an arbitrary number
of bits to be skipped. The former nal_reader_skip() function is too
limited to the actual cache size.
Use this new function to simplify gst_h264_parser_parse_sei_message()
default case, that skips unsupported payloads.
v2: made args consistent from header to source file.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
The payloadSize does not account for emulation prevention bytes. So,
just use nal_reader_skip() for skipping payload_size bits. It should
be possible to further optimize this code since the NAL reader shall
be aligned to byte boundary already.
Kill the now unused nal_reader_skip_to_next_byte() function.
https://bugzilla.gnome.org/show_bug.cgi?id=726829
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Account for trailing zero bits when checking for rbsp_more_data().
In particular, fix an hypothetical stream whereby rbsp_more_data()
is called in the following conditions for PPS header: NalReader
reached position 20, 12 bits are remaining and trailing data at
current byte position is c8 00.
rbsp_more_data() used to return TRUE whereas it should obviously
return FALSE because x8 00 represents a valid rbsp_trailing_bits()
structure.
https://bugzilla.gnome.org/show_bug.cgi?id=685890
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>