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

Felix Abecassis felix.abecassis at gmail.com
Wed Sep 10 12:27:30 CEST 2014

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,
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.

Or we can avoid restarting the vout and handle it like deinterlacing:
if we force a stereo 3D mode, we can add a conversion filter in the
chain in the case the vout doesn't support the new mode or send an
event to the vout if it supports this mode.

I also thought of a new video filter that would simply modify the
stereo format in the filter chain, but in this case the core will
convert from the new format to the old format the vout was initialized
with. So if initially we had 2D, if we force to SBS, a conversion
filter would be added to convert from SBS to 2D, even if the vout
supports SBS. Maybe we can make a special case here and probe the
stereo 3D capabilities of the vout before adding a filter.
We have the same issue when adding the transform filter for rotation,
this is why I added a special case to swscale to modify the aspect
ratio so the output would look correct.

Thoughts on this? Any other ideas?


Félix Abecassis

More information about the vlc-devel mailing list