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>
This commit is contained in:
Niklas Haas 2021-08-02 12:24:27 +02:00 committed by James Almer
parent 83860a3d8c
commit 33756c539b
1 changed files with 1 additions and 1 deletions

View File

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