h265parser: Skip unused bits in an SEI.
Alternative approach to 18b54f8d347030c73d8afbeaf55df57aa5acbb96 that skips all bits in a broken SEI correctly.
This commit is contained in:
parent
98f8bb4e7e
commit
69ef74d96a
@ -2539,7 +2539,7 @@ nal_reader_has_more_data_in_payload (NalReader * nr,
|
||||
guint32 payload_start_pos_bit, guint32 payloadSize)
|
||||
{
|
||||
if (nal_reader_is_byte_aligned (nr) &&
|
||||
(nal_reader_get_pos (nr) == (payload_start_pos_bit + 8 * payloadSize)))
|
||||
(nal_reader_get_pos (nr) >= (payload_start_pos_bit + 8 * payloadSize)))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
@ -2640,7 +2640,7 @@ gst_h265_parser_parse_sei_message (GstH265Parser * parser,
|
||||
* In theory, we can have a more optimized implementation by skipping the
|
||||
* data left in PayLoadSize without out individually checking for each bits,
|
||||
* since the totoal size will be always less than payloadSize*/
|
||||
if (nal_reader_has_more_data_in_payload (nr, payload_start_pos_bit,
|
||||
while (nal_reader_has_more_data_in_payload (nr, payload_start_pos_bit,
|
||||
payloadSize)) {
|
||||
/* Skip the byte alignment bits */
|
||||
if (!nal_reader_skip (nr, 1))
|
||||
|
Loading…
x
Reference in New Issue
Block a user