[vlc-devel] [PATCH 06/26] audio filters: split the call to vout_Request()
Rémi Denis-Courmont
remi at remlab.net
Sat Sep 21 09:30:57 CEST 2019
Le perjantaina 20. syyskuuta 2019, 17.28.36 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)
This does not look right. If a use case does not need the surface allocator
"decoder device", it should not need to request it. I don't get why you change
the vout_Request() API at all.
> + {
> + 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,
--
雷米‧德尼-库尔蒙
http://www.remlab.net/
More information about the vlc-devel
mailing list