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.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
This commit is contained in:
Sreerenj Balachandran 2015-04-10 14:07:56 +03:00 committed by Sebastian Dröge
parent b17a026eb7
commit a86e7c1c1f

View file

@ -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);