[vlc-devel] [PATCH 07/31] audio filters: split the call to vout_Request()

Steve Lhomme robux4 at ycbcr.xyz
Tue Sep 24 09:45:23 CEST 2019


On 2019-09-23 19:12, Rémi Denis-Courmont wrote:
> Le maanantaina 23. syyskuuta 2019, 18.01.12 EEST Steve Lhomme a écrit :
>> ---
>>   src/audio_output/filters.c | 15 ++++++++++-----
>>   1 file changed, 10 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
>> index dad467b44f0..d2c1a04feb9 100644
>> --- a/src/audio_output/filters.c
>> +++ b/src/audio_output/filters.c
>> @@ -38,7 +38,7 @@
>>   #include <vlc_filter.h>
>>   #include <libvlc.h>
>>   #include "aout_internal.h"
>> -#include "../video_output/vout_internal.h" /* for vout_Request */
>> +#include "../video_output/vout_internal.h" /* for vout_RequestDisplay */
>>
>>   static filter_t *CreateFilter(vlc_object_t *obj, vlc_clock_t *clock,
>>                                 const char *type, const char *name,
>> @@ -395,11 +395,16 @@ vout_thread_t *aout_filter_GetVout(filter_t *filter,
>> const video_format_t *fmt)
>>
>>       video_format_AdjustColorSpace(&adj_fmt);
>>
>> -    if (vout_Request(&cfg, NULL, NULL)) {
>> -        vout_Close(vout);
>> -        vout = NULL;
>> +    if (vout_HoldDevice(&cfg, NULL) == 0)
> 
> Still seems wrong.

If you mean: only the vout_RequestDisplay() should be used, I agree. For 
now the split is a basic cut in half of vout_Request(). It could be 
reworked further to create the vout in vout_RequestDisplay() if 
vout_HoldDevice() was never called.

>> +    {
>> +        if (vout_RequestDisplay(&cfg, NULL) == 0)
>> +        {
>> +            return vout;
>> +        }
>>       }
>> -    return vout;
>> +
>> +    vout_Close(vout);
>> +    return NULL;
>>   }
>>
>>   static int AppendFilter(vlc_object_t *obj, const char *type, const char
>> *name,
> 
> 
> -- 
> 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