aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2021-08-02 12:24:27 +0200
committerJames Almer <jamrial@gmail.com>2021-08-15 13:15:21 -0300
commit33756c539b652fc6c2d10f92ab1ca71559619fa6 (patch)
tree3510d1aa2c7a54bf50465e4615c63f1575b1e60e
parent83860a3d8c45ee2575eb2b8343c0f27f74b61d5d (diff)
downloadffmpeg-33756c539b652fc6c2d10f92ab1ca71559619fa6.tar.gz
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: 4ff73add5dbe6c319d693355be44df2e17a0b8bf Signed-off-by: Niklas Haas <git@haasn.dev>
-rw-r--r--libavcodec/h264_sei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264_sei.c b/libavcodec/h264_sei.c
index 7797f24650..329c2ea4f2 100644
--- a/libavcodec/h264_sei.c
+++ b/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;