diff options
author | He Junyan <junyan.he@intel.com> | 2021-06-29 15:09:13 +0800 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-07-01 11:14:15 +0000 |
commit | d152ab1d3734e285f3b79ad61bd5facb2364a3af (patch) | |
tree | 3578fab9df29bb3b1ab9fa47708ffcc3257c2c9b /gst-libs | |
parent | 310ffc17a8406359af60762f42b5a66cc14f8c3f (diff) |
libs: decoder: av1: Clean the film_grain_info field.
We need to clean all film_grain_info fields when the film grain
feature is not enabled. It may have random data because the picture
parameter buffer is not cleaned.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/434>
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_av1.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_av1.c b/gst-libs/gst/vaapi/gstvaapidecoder_av1.c index a4faf5d2..eff62e63 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_av1.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_av1.c @@ -372,9 +372,10 @@ av1_fill_film_grain_info (VADecPictureParameterBufferAV1 * pic_param, { guint i; - if (!frame_header->film_grain_params.apply_grain) + if (!frame_header->film_grain_params.apply_grain) { + memset (&pic_param->film_grain_info, 0, sizeof (VAFilmGrainStructAV1)); return; - + } #define COPY_FILM_GRAIN_FIELD(FP) \ pic_param->SUB_FIELD.FP = (frame_header)->film_grain_params.FP #define SUB_FIELD film_grain_info.film_grain_info_fields.bits |