aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-01-10 12:18:58 -0300
committerJames Almer <jamrial@gmail.com>2022-01-10 12:21:52 -0300
commitfa1328babf09006451c0c63079f2b66a58956ec3 (patch)
tree2d82583b624cc73f9c266b85ae01ee1932e4453c /libavcodec
parentcd74c838fc5e751b636e0df41ad343d2d899bb0b (diff)
downloadffmpeg-fa1328babf09006451c0c63079f2b66a58956ec3.tar.gz
avcodec/libdav1d: explicitly set Dav1dSettings.apply_grain
Don't depend on its default value being 1, as that could change anytime. Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 6c4074e4234edacfb3f37184fd68771df3cb2b7f)
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libdav1d.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 8e45f533cb..29fa4f9c3d 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -230,8 +230,8 @@ static av_cold int libdav1d_init(AVCodecContext *c)
s.frame_size_limit = c->max_pixels;
if (dav1d->apply_grain >= 0)
s.apply_grain = dav1d->apply_grain;
- else if (c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN)
- s.apply_grain = 0;
+ else
+ s.apply_grain = !(c->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN);
s.all_layers = dav1d->all_layers;
if (dav1d->operating_point >= 0)