[FFmpeg-devel] [PATCH, RFC] lavc/vp9dec: fix the multi-thread HWAccel decode error

Fu, Linjie linjie.fu at intel.com
Wed Jun 12 05:06:02 EEST 2019


> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Hendrik Leppkes
> Sent: Tuesday, June 11, 2019 15:50
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH, RFC] lavc/vp9dec: fix the multi-thread
> HWAccel decode error
> 
> 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.
> 

Thanks Hendrik, need to reconsider this and seek for a better solution.


More information about the ffmpeg-devel mailing list