mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
h265parser: Skip unused bits in an SEI.
Alternative approach to 18b54f8d34
that skips all bits in a broken SEI correctly.
This commit is contained in:
parent
98f8bb4e7e
commit
69ef74d96a
1 changed files with 2 additions and 2 deletions
|
@ -2539,7 +2539,7 @@ nal_reader_has_more_data_in_payload (NalReader * nr,
|
||||||
guint32 payload_start_pos_bit, guint32 payloadSize)
|
guint32 payload_start_pos_bit, guint32 payloadSize)
|
||||||
{
|
{
|
||||||
if (nal_reader_is_byte_aligned (nr) &&
|
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 FALSE;
|
||||||
|
|
||||||
return TRUE;
|
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
|
* In theory, we can have a more optimized implementation by skipping the
|
||||||
* data left in PayLoadSize without out individually checking for each bits,
|
* data left in PayLoadSize without out individually checking for each bits,
|
||||||
* since the totoal size will be always less than payloadSize*/
|
* 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)) {
|
payloadSize)) {
|
||||||
/* Skip the byte alignment bits */
|
/* Skip the byte alignment bits */
|
||||||
if (!nal_reader_skip (nr, 1))
|
if (!nal_reader_skip (nr, 1))
|
||||||
|
|
Loading…
Reference in a new issue