[FFmpeg-devel] [PATCH, RFC] lavc/vp9dec: fix the multi-thread HWAccel decode error
h.leppkes at gmail.com
Tue Jun 11 10:50:02 EEST 2019
On Tue, Jun 11, 2019 at 9:20 AM Linjie Fu <linjie.fu at intel.com> wrote:
> Fix the multi-thread HWAccel decode error for vp9.
> VP9 supports the resolution changing. In multi-thread mode, worker-threads
> destroy and free the first created VAAPIDecodeContext if resolution change
> happens and create new one. Other threads still request to destroy previous
> and demand for new context. This leads to decode failures and memory issue.
> Modify to call hwaccel_uninit/hwaccel_init by ff_thread_get_format only
> when the first-come thread detected the resolution changing.
s->gf_fmt, s->w and s->h are updated through
vp9_decode_update_thread_context, wouldn't they prevent
re-initialization already, as long as the size only changes once?
If not, why not? Perhaps thats a better avenue to fix it, then hacky
conditions like this one.
More information about the ffmpeg-devel