diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-23 00:46:04 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-09-26 21:06:14 +0200 |
commit | 14015b9e157014b24c74098daee9c6eab15cb6c8 (patch) | |
tree | 3c8e6bb38ade6ee7de0082b40bace348547ec2ad /libavcodec/vlc.c | |
parent | 378f1b6a393e7bf0ceb50a9454e3664a599d84d1 (diff) | |
download | ffmpeg-14015b9e157014b24c74098daee9c6eab15cb6c8.tar.gz |
avcodec/hevcdec: Check early whether film grain is supported, fix race
Applying film grain happens after ff_thread_finish_setup(),
so the parameters synced in hevc_update_thread_context() must not
be modified. But this is exactly what happens in case applying
film grain fails. (The likely result is that in case of frame threading
an uninitialized frame is output.)
Given that it is actually very easy to know in advance whether
ff_h274_apply_film_grain() supports a given set of parameters,
one can check for this before ff_thread_finish_setup()
and avoid allocating an unused buffer lateron.
Reviewed-by: Niklas Haas <ffmpeg@haasn.xyz>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vlc.c')
0 files changed, 0 insertions, 0 deletions