[vlc-devel] [PATCH] decoder: fix NULL dereference when video format is updating

Rémi Denis-Courmont remi at remlab.net
Tue Apr 28 10:58:29 CEST 2015


Le 2015-04-28 11:49, Thomas Guillem a écrit :
>> But at any other times, the decoder thread can indeed read the value
>> without
>> lock, so vout pointer must be read-only.
>
> Could we add a rwlock to protect p_vout and p_aout ?

How does that help in any way?

>> > If it's not the case anymore, we should add
>> > locks everytime we read p_vout from this thread. Am I right ?
>>
>> Yes.
>>
>> And also somehow ensure that pictures from a previous vout (before 
>> last
>> format
>> update) is not queued to the current vout. It could be argued that
>> threaded
>> decoder plugins should be responsible for this though.
>
> Could we add a i_id in vout_thread_t, that is incremented from
> vout_Request ?
> This i_id will be set to a p_pic->i_vout_id from vout_GetPicture.

We could already check if the picture is part of the current pool; 
there is no need for a fugly generation counter. But I just don't see 
how that helps eitehr way: the picture needs to be rendered afterall.

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list