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

Thomas Guillem thomas at gllm.fr
Mon Apr 27 19:14:44 CEST 2015

On Mon, Apr 27, 2015, at 18:25, Rémi Denis-Courmont wrote:
> Le lundi 27 avril 2015, 18:08:44 Thomas Guillem a écrit :
> > p_owner->p_vout can be set to NULL by decoder_UpdateVideoFormat that can be
> > called from a different thread than the decoder one (see avcodec).
> If the current reads p_owner->p_vout (at line 861 and also in the calling 
> function), then p_owner->p_vout must be read-only.
> So this is a bug in avcodec, or a limitation of the decoder core
> depending on 
> your point of view. Either way, the patch does not seem "sufficient" to
> me.

OK, it's not sufficient because p_vout should be written only by the
DecoderThread (for now). If it's not the case anymore, we should add
locks everytime we read p_vout from this thread. Am I right ?

> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

More information about the vlc-devel mailing list