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

Steve Lhomme robux4 at ycbcr.xyz
Fri Jul 5 16:19:53 CEST 2019


---
 src/audio_output/filters.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index efe6a11973..679651d67f 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -39,7 +39,7 @@
 #include <vlc_codec.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_RequestDevice */
 
 static filter_t *CreateFilter(vlc_object_t *obj, vlc_clock_t *clock,
                               const char *type, const char *name,
@@ -397,15 +397,19 @@ vout_thread_t *aout_filter_GetVout(filter_t *filter, const video_format_t *fmt)
     video_format_AdjustColorSpace(&adj_fmt);
 
     vlc_decoder_device *dec_dev = NULL;
-    if (vout_Request(&cfg, &dec_dev, NULL)) {
-        if (dec_dev)
+    if (vout_RequestDevice(&cfg, &dec_dev) == 0)
+    {
+        if (vout_RequestDisplay(&cfg, NULL) == 0)
+        {
+            /* FIXME unused for now */
             vlc_decoder_device_Release(dec_dev);
-        vout_Close(vout);
-        vout = NULL;
+            return vout;
+        }
     }
-    /* FIXME unused for now */
+
     vlc_decoder_device_Release(dec_dev);
-    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