[vlc-devel] [PATCH] Core: Disable vout recycling for the visualization (fixes #9270) This avoids the vout opened for by the "visual" module to stay opened after having started an OpenGL based visualization.

Adrien Maglo magsoft at videolan.org
Mon Sep 2 23:12:00 CEST 2013


Le 02/09/2013 22:46, Adrien Maglo a écrit :
> Le 02/09/2013 18:17, Rémi Denis-Courmont a écrit :
>> Le dimanche 1 septembre 2013 13:48:49 Adrien Maglo a écrit :
>>> ---
>>>   src/audio_output/filters.c | 4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
>>> index 796da1f..e20d275 100644
>>> --- a/src/audio_output/filters.c
>>> +++ b/src/audio_output/filters.c
>>> @@ -337,7 +337,9 @@ vout_thread_t *aout_filter_RequestVout (filter_t
>>> *filter, vout_thread_t *vout, * to aout_request_vout_t inside filter_t
>>> (i.e. a level of indirection). */ const aout_request_vout_t *req = (void
>>> *)filter->p_owner;
>>>       char *visual = var_InheritString (filter->p_parent,
>>> "audio-visual");
>>> -    bool recycle = (visual != NULL) && strcasecmp(visual, "none");
>>> +    /* NOTE: Disable recycling to allways close the filter vout because
>>> OpenGL
>>> +     * visualizations do not use this function to ask for a
>>> context. */
>>> +    bool recycle = false;
>>
>> Not all visualizations use OpenGL. If some are broken, fix those.
>
> The problem is not in the visualizations. AFAIK, they use the single API
> they have to ask for an OpenGL context. This is a problem in the core.
>
> The non-OpenGL visualizations uses aout_filter_RequestVout() to get a
> vout while the OpenGL visualizations uses vout_NewDisplay() because they
> need precise that the vout must be an OpenGL one.
>
> The problem is that vout_NewDisplay() don't clean free remaining vout
> before creating an OpenGL context. That causes the bug described in the
> ticket #9270. Besides, aout_filter_RequestVout() can't provide
> specifically an OpenGL context.
>
> The cleanest solution would be to extend aout_filter_RequestVout() to
> allow to obtain specifically an OpenGL vout and possibly recycle them.

Actually, this does not have sense since the OpenGL visualizations do 
not require a vout but a display, which only creates the context...


-- 
MagSoft




More information about the vlc-devel mailing list