[vlc-commits] commit: Removed uneeded hack (vout). (Laurent Aimar )

git at videolan.org git at videolan.org
Tue Nov 2 21:20:44 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Nov  1 20:55:29 2010 +0100| [1df47ba694fe3c5fdc6ad08c90fc1c598ca78f3d] | committer: Laurent Aimar 

Removed uneeded hack (vout).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1df47ba694fe3c5fdc6ad08c90fc1c598ca78f3d
---

 src/video_output/video_output.c |    6 ++----
 src/video_output/vout_wrapper.c |   14 +++++++-------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 41bd270..f3f5719 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -143,12 +143,10 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
     /* Get splitter name if present */
     char *splitter_name = var_InheritString(vout, "video-splitter");
     if (splitter_name && *splitter_name) {
-        if (asprintf(&vout->p->splitter_name, "%s,none", splitter_name) < 0)
-            vout->p->splitter_name = NULL;
+        vout->p->splitter_name = splitter_name;
     } else {
-        vout->p->splitter_name = NULL;
+        free(splitter_name);
     }
-    free(splitter_name);
 
     /* */
     vout_InitInterlacingSupport(vout, vout->p->displayed.is_interlaced);
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index 3507f39..7fad618 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -48,7 +48,7 @@ static int  Forward(vlc_object_t *, char const *,
  *
  *****************************************************************************/
 int vout_OpenWrapper(vout_thread_t *vout,
-                     const char *name, const vout_display_state_t *state)
+                     const char *splitter_name, const vout_display_state_t *state)
 {
     vout_thread_sys_t *sys = vout->p;
     msg_Dbg(vout, "Opening vout display wrapper");
@@ -66,13 +66,13 @@ int vout_OpenWrapper(vout_thread_t *vout,
     const mtime_t double_click_timeout = 300000;
     const mtime_t hide_timeout = var_CreateGetInteger(vout, "mouse-hide-timeout") * 1000;
 
-    sys->display.vd = vout_NewDisplay(vout, &source, state, name ? name : "$vout",
-                                      double_click_timeout, hide_timeout);
-    /* If we need to video filter and it fails, then try a splitter
-     * XXX it is a hack for now FIXME */
-    if (name && !sys->display.vd)
-        sys->display.vd = vout_NewSplitter(vout, &source, state, "$vout", name,
+    if (splitter_name) {
+        sys->display.vd = vout_NewSplitter(vout, &source, state, "$vout", splitter_name,
                                            double_click_timeout, hide_timeout);
+    } else {
+        sys->display.vd = vout_NewDisplay(vout, &source, state, "$vout",
+                                          double_click_timeout, hide_timeout);
+    }
     if (!sys->display.vd) {
         free(sys->display.title);
         return VLC_EGENERIC;



More information about the vlc-commits mailing list