Skip to content

codecs: vp9statefulparser: rework the exit_bool() checks

Daniel Almeida requested to merge dwlsalmeida/gstreamer:vp9-padding into main

There are at least two things wrong with the exit_bool() implementation.

if (padding != 0 || (n < 8 && (padding & 0xe0) == 0xc0))

The first one being that we can only enter the second condition of that if statement if padding == 0, which makes the second condition always false.

The second one being that padding == 0 is valid (and required) if n == 8, i.e.:

9.2.3: It is a requirement of bitstream conformance that padding is equal to 0.

So fix this by explicitly checking the two conditions.

Merge request reports

Loading