Commit a86e7c1c authored by Sreerenj Balachandran's avatar Sreerenj Balachandran Committed by Sebastian Dröge

codecparser: h265: skip byte alignment bits while parsing slice header

Skip the byte alignment bits as per the logic of byte_alignment()
provided in hevc specification. This will fix the calculation of
slice header size.
parent b17a026e
......@@ -2185,6 +2185,14 @@ gst_h265_parser_parse_slice_hdr (GstH265Parser * parser,
goto error;
/* Skip the byte alignment bits */
if (!nal_reader_skip (&nr, 1))
goto error;
while (!nal_reader_is_byte_aligned (&nr)) {
if (!nal_reader_skip (&nr, 1))
goto error;
slice->header_size = nal_reader_get_pos (&nr);
slice->n_emulation_prevention_bytes = nal_reader_get_epb_count (&nr);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment