diff options
author | Linjie Fu <linjie.fu@intel.com> | 2019-12-27 16:47:35 +0800 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-03-27 10:57:40 +0100 |
commit | 091341f2ab5bd35ca1a2aae90503adc74f8d3523 (patch) | |
tree | 3756dacd3a9e853c67826d80792b605607a54cd5 /doc/examples/avio_reading.c | |
parent | ddbd77da904ca48b8cbec19037860a3a305eccd0 (diff) | |
download | ffmpeg-091341f2ab5bd35ca1a2aae90503adc74f8d3523.tar.gz |
lavc/pthread_frame: Update user context in ff_frame_thread_free
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: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'doc/examples/avio_reading.c')
0 files changed, 0 insertions, 0 deletions