Update of /cvsroot/xine/gnome-xine/src
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6675/src

Modified Files:
        gtkvideo.c player.c utils.c utils.h 
Log Message:
Update to 0.5.10.

Index: gtkvideo.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/gtkvideo.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- gtkvideo.c  7 Jan 2007 20:26:25 -0000       1.132
+++ gtkvideo.c  3 Feb 2007 14:59:31 -0000       1.133
@@ -695,17 +695,9 @@
     video_driver_id = priv->video_driver_id;
   else
   {
-    char **driver_ids = (char **) xine_list_video_output_plugins (priv->xine);
-    char **choices = malloc (sizeof (char *) * 100);
-    choices[0] = "auto";
-
-    int i = -1;
-    while (driver_ids[++i])
-      choices[i + 1] = strdup(driver_ids[i]);
-    choices[i + 1]=0;
-
+    char **choices = get_driver_ids (xine_list_video_output_plugins 
(priv->xine));
     /* try to init video with stored information */
-    i = xine_config_register_enum (priv->xine,
+    int i = xine_config_register_enum (priv->xine,
                                   "video.driver", 0,
                                   choices,
                                   N_("video driver to use"),

Index: player.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/player.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- player.c    9 Dec 2006 14:05:30 -0000       1.92
+++ player.c    3 Feb 2007 14:59:31 -0000       1.93
@@ -1004,17 +1004,9 @@
 
   if (!audio_driver_id)
   {
-    char **driver_ids = (char **) xine_list_audio_output_plugins (xine);
-    char **choices = malloc (sizeof (char *) * 100);
-    choices[0] = "auto";
-
-    int i = -1;
-    while (driver_ids[++i])
-      choices[i + 1] = strdup(driver_ids[i]);
-    choices[i + 1]=0;
-
+    char **choices = get_driver_ids (xine_list_audio_output_plugins (xine));
     /* try to init audio with stored information */
-    i = xine_config_register_enum (xine,
+    int i = xine_config_register_enum (xine,
                                    "audio.driver", 0,
                                    choices,
                                    _("audio driver to use"),

Index: utils.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/utils.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -r1.83 -r1.84
--- utils.c     9 Dec 2006 14:05:30 -0000       1.83
+++ utils.c     3 Feb 2007 14:59:31 -0000       1.84
@@ -526,6 +526,20 @@
   return *str = ret;
 }
 
+char **get_driver_ids (const char *const *source)
+{
+  guint size = g_strv_length (source);
+  char **ids = calloc (size + 2, sizeof (char *));
+  int i;
+
+  ids[0] = "auto";
+  for (i = 0; i < size; ++i)
+    ids[i + 1] = strdup (source[i]);
+  ids[i + 1]=0;
+
+  return ids;
+}
+
 #ifdef EXP_STUFF
 char *unique_name (char *base)
 {

Index: utils.h
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/utils.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- utils.h     9 Dec 2006 14:05:30 -0000       1.48
+++ utils.h     3 Feb 2007 14:59:31 -0000       1.49
@@ -94,6 +94,7 @@
                          __attribute__ ((sentinel));
 
 char *asreprintf (char **str, const char *fmt, ...);
+char **get_driver_ids (const char *const *source);
 
 #ifdef EXP_STUFF
 char *unique_name (char *base);


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Xine-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xine-cvslog

Reply via email to