[vlc-devel] [PATCH 06/26] audio filters: split the call to vout_Request()
Steve Lhomme
robux4 at ycbcr.xyz
Fri Sep 20 16:28:36 CEST 2019
---
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)
+ {
+ 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,
--
2.17.1
More information about the vlc-devel
mailing list