avcodec/h264_sei: honor the Film Grain Characteristics cancel flag

Film Grain persistence is cancelled when it's true.

Signed-off-by: James Almer <jamrial@gmail.com>
pull/360/head
James Almer 3 years ago
parent da6975f022
commit f7958d0883
  1. 4
      libavcodec/h264_sei.c

@ -420,9 +420,9 @@ static int decode_alternative_transfer(H264SEIAlternativeTransfer *h,
static int decode_film_grain_characteristics(H264SEIFilmGrainCharacteristics *h,
GetBitContext *gb)
{
int film_grain_characteristics_cancel_flag = get_bits1(gb);
h->present = !get_bits1(gb); // film_grain_characteristics_cancel_flag
if (!film_grain_characteristics_cancel_flag) {
if (h->present) {
memset(h, 0, sizeof(*h));
h->model_id = get_bits(gb, 8);
h->separate_colour_description_present_flag = get_bits1(gb);

Loading…
Cancel
Save