[vlc-devel] [PATCH 11/14] vout: lock picture pool when restarting vout thread

Rémi Denis-Courmont remi at remlab.net
Wed Sep 10 17:50:10 CEST 2014


Le mercredi 10 septembre 2014, 12:27:30 Felix Abecassis a écrit :
> 2014-09-09 20:17 GMT+02:00 Rémi Denis-Courmont <remi at remlab.net>:
> > I don't think this can work. The decoder would get picture buffers from
> > the
> > "wrong" format. Locking won't help it.
> 
> To be sure, you mean the fmt_out of the decoder will not be the same
> as the format of the pictures retrieved from the new decoder pool,
> right?
> You are right. So if we want to be able to force the stereo3d mode and
> still restart the vout, we would need to modify
> p_dec->fmt_out.video.stereo somehow, vout_new_buffer will trigger a
> vout restart then.

If you do that, the video output display will be destroyed, and the direct 
rendering picture pool alongside it. Then the decoder will crash when it tries 
to access a pending reference picture, or send an already locked picture for 
display.

There are a few video output display plugins that can keep their "old" picture 
buffers alive even after the display is destroyed. Even then, the decoder will 
still potentially crash in vout_ReleasePicture(). And in any case, the 
displaying any pending picture from the old format is likely to fail one way 
or another.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list