summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-20 07:51:03 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-03-20 07:51:03 +0000
commit19ce70acb99569ed508d242817a3983c426c47f9 (patch)
tree54892bcac8e1ab84ce15b1dd3148316c772aa99c /Gui
parent25b01160bcb39fd156a060ecfc546b4641406da0 (diff)
downloadmpv-19ce70acb99569ed508d242817a3983c426c47f9.tar.bz2
mpv-19ce70acb99569ed508d242817a3983c426c47f9.tar.xz
bugfix from Raindel Shachar <raindel@techunix.technion.ac.il>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9624 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/interface.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/Gui/interface.c b/Gui/interface.c
index fd96aeea86..9a77c601e1 100644
--- a/Gui/interface.c
+++ b/Gui/interface.c
@@ -39,6 +39,15 @@
#include "../libmpdemux/stheader.h"
#include "../libmpcodecs/dec_video.h"
+
+#ifdef NEW_CONFIG
+ #include "../m_option.h"
+ #include "../m_config.h"
+#else
+ #include "../cfgparser.h"
+#endif
+#include "../cfg-mplayer-def.h"
+
guiInterface_t guiIntfStruct;
int guiWinID=-1;
@@ -343,7 +352,7 @@ extern ao_functions_t * audio_out;
extern vo_functions_t * video_out;
extern int frame_dropping;
extern int stream_dump_type;
-extern char ** vo_plugin_args;
+extern m_obj_settings_t*vo_plugin_args;
#if defined( USE_OSD ) || defined( USE_SUB )
void guiLoadFont( void )
@@ -439,10 +448,10 @@ static void add_vop( char * str )
if ( vo_plugin_args )
{
int i = 0;
- while ( vo_plugin_args[i] ) if ( !gstrcmp( vo_plugin_args[i++],str ) ) { i=-1; break; }
+ while ( vo_plugin_args[i].name ) if ( !gstrcmp( vo_plugin_args[i++].name,str ) ) { i=-1; break; }
if ( i != -1 )
- { vo_plugin_args=realloc( vo_plugin_args,( i + 2 ) * sizeof( char * ) ); vo_plugin_args[i]=strdup( str ); vo_plugin_args[i+1]=NULL; }
- } else { vo_plugin_args=malloc( 2 * sizeof( char * ) ); vo_plugin_args[0]=strdup( str ); vo_plugin_args[1]=NULL; }
+ { vo_plugin_args=realloc( vo_plugin_args,( i + 2 ) * sizeof( m_obj_settings_t ) ); vo_plugin_args[i].name=strdup( str );vo_plugin_args[i].attribs = NULL; vo_plugin_args[i+1].name=NULL; }
+ } else { vo_plugin_args=malloc( 2 * sizeof( m_obj_settings_t ) ); vo_plugin_args[0].name=strdup( str );vo_plugin_args[0].attribs = NULL; vo_plugin_args[1].name=NULL; }
}
static void remove_vop( char * str )
@@ -453,16 +462,16 @@ static void remove_vop( char * str )
mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[gui] remove video filter: %s\n",str );
- while ( vo_plugin_args[n++] ); n--;
+ while ( vo_plugin_args[n++].name ); n--;
if ( n > -1 )
{
int i = 0,m = -1;
- while ( vo_plugin_args[i] ) if ( !gstrcmp( vo_plugin_args[i++],str ) ) { m=i - 1; break; }
+ while ( vo_plugin_args[i].name ) if ( !gstrcmp( vo_plugin_args[i++].name,str ) ) { m=i - 1; break; }
i--;
if ( m > -1 )
{
- if ( n == 1 ) { free( vo_plugin_args[0] ); free( vo_plugin_args ); vo_plugin_args=NULL; }
- else memcpy( &vo_plugin_args[i],&vo_plugin_args[i + 1],( n - i ) * sizeof( char * ) );
+ if ( n == 1 ) { free( vo_plugin_args[0].name );free( vo_plugin_args[0].attribs ); free( vo_plugin_args ); vo_plugin_args=NULL; }
+ else { free( vo_plugin_args[i].name );free( vo_plugin_args[i].attribs ); memcpy( &vo_plugin_args[i],&vo_plugin_args[i + 1],( n - i ) * sizeof( m_obj_settings_t ) ); }
}
}
}
@@ -1084,12 +1093,6 @@ int import_file_into_gui(char* temp, int insert)
return 1;
}
-#ifdef NEW_CONFIG
- #include "../m_option.h"
- #include "../m_config.h"
-#else
- #include "../cfgparser.h"
-#endif
// This function imports the initial playtree (based on cmd-line files) into the gui playlist
// by either: