aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/x86/rgb_2_rgb.asm
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2022-09-15 14:53:36 +0200
committerAnton Khirnov <anton@khirnov.net>2022-09-25 10:01:34 +0200
commitddf3bedfb8160883fd9fdfd4082050d904f51755 (patch)
treea224ccc1abb4ed747a851785b0b1c0079d7cd86d /libswscale/x86/rgb_2_rgb.asm
parentfe741cd0afbbfe54f636c5dce9b452edc022f8f9 (diff)
downloadffmpeg-ddf3bedfb8160883fd9fdfd4082050d904f51755.tar.gz
lavc/videotoolbox: do not pass AVCodecContext to decoder output callback
The opaque parameter for the callback is set in videotoolbox_start(), called when the hwaccel is initialized. When frame threading is used, avctx will be the context corresponding to the frame thread currently doing the decoding. Using this same codec context in all subsequent invocations of the decoder callback (even those triggered by a different frame thread) is unsafe, and broken after cc867f2c09d2b69cee8a0eccd62aff002cbbfe11, since each frame thread now cleans up its hwaccel state after decoding each frame. Fix this by passing hwaccel_priv_data as the opaque parameter, which exists in a single instance forwarded between all frame threads. The only other use of AVCodecContext in the decoder output callback is as a logging context. For this purpose, store a logging context in hwaccel_priv_data. (cherry picked from commit d7f4ad88a0df3c1339e142957bf2c40cd056b8ce) Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libswscale/x86/rgb_2_rgb.asm')
0 files changed, 0 insertions, 0 deletions