]> git.sesse.net Git - vlc/commitdiff
-replaced setenv with putenv
authorStéphane Borel <stef@videolan.org>
Mon, 4 Mar 2002 02:26:23 +0000 (02:26 +0000)
committerStéphane Borel <stef@videolan.org>
Mon, 4 Mar 2002 02:26:23 +0000 (02:26 +0000)
-fixed a bug in gtk.

plugins/dvd/input_dvd.c
plugins/gtk/gtk_open.c

index 3a99b1f002b8d46692f56d2a968da344fba12d42..19a20cbc82dc493be3a690c5797fbc9f12fcd077 100644 (file)
@@ -8,7 +8,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.127 2002/03/04 01:53:56 stef Exp $
+ * $Id: input_dvd.c,v 1.128 2002/03/04 02:26:23 stef Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -372,7 +372,12 @@ static int DVDOpen( struct input_thread_s *p_input )
     {
         if( *psz_raw )
         {
-            setenv( "DVDCSS_RAW_DEVICE", psz_raw, 1 );
+            char * psz_env;
+            psz_env = malloc( strlen("DVDCSS_RAW_DEVICE=")
+                            + strlen( psz_raw ) + 1 );
+            sprintf( psz_env, "DVDCSS_RAW_DEVICE=%s", psz_raw );
+            fprintf(stderr, "%s\n", psz_env );
+            putenv( psz_env );
         }
         else
         {
index 2ebba1155cb64b06499cca78ca8cfa6eea5036b3..7bd19aff6127f1ee91ce339738818147ddb1c939 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_open.c : functions to handle file/disc/network open widgets.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_open.c,v 1.17 2002/03/04 01:53:56 stef Exp $
+ * $Id: gtk_open.c,v 1.18 2002/03/04 02:26:23 stef Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -201,7 +201,6 @@ void GtkDiscOpenOk( GtkButton * button, gpointer user_data )
     else
     {
         intf_ErrMsg( "intf error: unknown disc type toggle button position" );
-        free( psz_source );
         return;
     }