avcodec/h264_sei: fix H.274 film grain parsing

The current code reads the wrong number of bits for `fg_model_id`, which
causes all of the values downstream of this to contain corrupt values.

Fixes: corrupt SEI values
Fixes: 4ff73add5d

Signed-off-by: Niklas Haas <git@haasn.dev>
pull/364/head
Niklas Haas 3 years ago committed by James Almer
parent 83860a3d8c
commit 33756c539b
  1. 2
      libavcodec/h264_sei.c

@ -424,7 +424,7 @@ static int decode_film_grain_characteristics(H264SEIFilmGrainCharacteristics *h,
if (h->present) {
memset(h, 0, sizeof(*h));
h->model_id = get_bits(gb, 8);
h->model_id = get_bits(gb, 2);
h->separate_colour_description_present_flag = get_bits1(gb);
if (h->separate_colour_description_present_flag) {
h->bit_depth_luma = get_bits(gb, 3) + 8;

Loading…
Cancel
Save