• Linjie Fu's avatar
    lavc/pthread_frame: Update user context in ff_frame_thread_free · 091341f2
    Linjie Fu authored
    Resolution/format changes lead to re-initialization of hardware
    accelerations(vaapi/dxva2/..) with new hwaccel_priv_data in
    the worker-thread. But hwaccel_priv_data in user context won't
    be updated until the resolution changing frame is output.
    
    A termination with "-vframes" just after the reinit will lead to:
        1. memory leak in worker-thread.
        2. double free in user-thread.
    
    Update user context in ff_frame_thread_free with the last thread
    submit_packet() was called on.
    
    To reproduce:
    ffmpeg -hwaccel vaapi(dxva2) -v verbose -i
        fate-suite/h264/reinit-large_420_8-to-small_420_8.h264 -pix_fmt nv12
        -f rawvideo -vsync passthrough -vframes 47 -y out.yuv
    Signed-off-by: 's avatarLinjie Fu <linjie.fu@intel.com>
    Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
    091341f2
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...