[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[550] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-12-12 15:25:29
|
Revision: 550 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=550&view=rev Author: nickols_k Date: 2012-12-12 15:25:16 +0000 (Wed, 12 Dec 2012) Log Message: ----------- use class ASX_Attrib instead of char*** in ASX_Parser + memory leak-- Modified Paths: -------------- mplayerxp/libmpconf/m_option.cpp mplayerxp/libmpconf/m_option.h mplayerxp/libmpconf/m_property.cpp mplayerxp/libmpconf/m_property.h mplayerxp/libmpconf/m_struct.cpp mplayerxp/libmpconf/m_struct.h mplayerxp/libplaytree/asxparser.cpp mplayerxp/libplaytree/asxparser.h mplayerxp/postproc/libmenu/menu.cpp mplayerxp/postproc/libmenu/menu.h mplayerxp/postproc/libmenu/menu_cmdlist.cpp mplayerxp/postproc/libmenu/menu_param.cpp mplayerxp/postproc/vf_menu.cpp Modified: mplayerxp/libmpconf/m_option.cpp =================================================================== --- mplayerxp/libmpconf/m_option.cpp 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/libmpconf/m_option.cpp 2012-12-12 15:25:16 UTC (rev 550) @@ -41,7 +41,7 @@ // Default function that just does a memcpy -static void copy_opt(const m_option_t* opt,any_t* dst,any_t* src) { +static void copy_opt(const m_option_t* opt,any_t* dst,const any_t* src) { if(dst && src) memcpy(dst,src,opt->type->size); } @@ -77,7 +77,7 @@ #define VAL(x) (*(int*)(x)) -static int parse_flag(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_flag(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { if (src == M_CONFIG_FILE) { if(!param) return M_OPT_MISSING_PARAM; if (!strcasecmp(param, "yes") || /* any other language? */ @@ -115,7 +115,7 @@ } } -static char* print_flag(const m_option_t* opt, any_t* val) { +static char* print_flag(const m_option_t* opt,const any_t* val) { if(VAL(val) == opt->min) return mp_strdup("no"); else @@ -137,7 +137,7 @@ // Integer -static int parse_int(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_int(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { long tmp_int; char *endptr; src = 0; @@ -168,7 +168,7 @@ return 1; } -static char* print_int(const m_option_t* opt, any_t* val) { +static char* print_int(const m_option_t* opt,const any_t* val) { opt = NULL; return dup_printf("%d",VAL(val)); } @@ -191,7 +191,7 @@ #undef VAL #define VAL(x) (*(double*)(x)) -static int parse_double(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_double(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { double tmp_float; char* endptr; src = 0; @@ -240,7 +240,7 @@ return 1; } -static char* print_double(const m_option_t* opt, any_t* val) { +static char* print_double(const m_option_t* opt,const any_t* val) { opt = NULL; return dup_printf("%f",VAL(val)); } @@ -261,14 +261,14 @@ #undef VAL #define VAL(x) (*(float*)(x)) -static int parse_float(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_float(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { double tmp; int r= parse_double(opt, name, param, &tmp, src); if(r==1 && dst) VAL(dst) = tmp; return r; } -static char* print_float(const m_option_t* opt, any_t* val) { +static char* print_float(const m_option_t* opt,const any_t* val) { opt = NULL; return dup_printf("%f",VAL(val)); } @@ -290,7 +290,8 @@ #undef VAL #define VAL(x) (*(off_t*)(x)) -static int parse_position(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_position(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { + UNUSED(src); off_t tmp_off; char dummy; @@ -320,7 +321,7 @@ return 1; } -static char* print_position(const m_option_t* opt, any_t* val) { +static char* print_position(const m_option_t* opt,const any_t* val) { UNUSED(opt); return dup_printf("%d",(int64_t)VAL(val)); } @@ -344,7 +345,7 @@ #undef VAL #define VAL(x) (*(char**)(x)) -static int parse_str(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_str(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { UNUSED(src); UNUSED(name); UNUSED(opt); @@ -374,13 +375,13 @@ } -static char* print_str(const m_option_t* opt, any_t* val) { +static char* print_str(const m_option_t* opt,const any_t* val) { UNUSED(opt); UNUSED(val); return (val && VAL(val) && strlen(VAL(val)) > 0) ? mp_strdup(VAL(val)) : NULL; } -static void copy_str(const m_option_t* opt,any_t* dst, any_t* src) { +static void copy_str(const m_option_t* opt,any_t* dst,const any_t* src) { UNUSED(opt); if(dst && src) { #ifndef NO_FREE @@ -390,7 +391,7 @@ } } -static void free_str(any_t* src) { +static void free_str(const any_t* src) { if(src && VAL(src)){ #ifndef NO_FREE delete VAL(src); //FIXME!!! @@ -424,7 +425,7 @@ #define OP_DEL 3 #define OP_CLR 4 -static void free_str_list(any_t* dst) { +static void free_str_list(const any_t* dst) { char** d; int i; @@ -440,7 +441,7 @@ VAL(dst) = NULL; } -static int str_list_add(char** add, int n,any_t* dst,int pre) { +static int str_list_add(const char** add, int n,any_t* dst,int pre) { char** lst = VAL(dst); int ln; @@ -465,7 +466,7 @@ return 1; } -static int str_list_del(char** del, int n,any_t* dst) { +static int str_list_del(char** del, int n,const any_t* dst) { char **lst,*ep,**d; int i,ln,s; long idx; @@ -516,8 +517,20 @@ return 1; } +static const char *get_nextsep(const char *ptr, char sep) { + const char *last_ptr = ptr; + for(;;){ + ptr = strchr(ptr, sep); + if(ptr && ptr>last_ptr && ptr[-1]=='\\'){ + ptr++; + }else + break; + } + return ptr; +} + static char *get_nextsep(char *ptr, char sep, int modify) { - char *last_ptr = ptr; + const char *last_ptr = ptr; for(;;){ ptr = strchr(ptr, sep); if(ptr && ptr>last_ptr && ptr[-1]=='\\'){ @@ -529,10 +542,11 @@ return ptr; } -static int parse_str_list(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_str_list(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { int n = 0,len = strlen(opt->name); char *str; - char *ptr = param, *last_ptr, **res; + const char *ptr = param; + char *last_ptr, **res; int op = OP_NONE; UNUSED(src); @@ -563,7 +577,7 @@ while(ptr[0] != '\0') { - ptr = get_nextsep(ptr, LIST_SEPARATOR, 0); + ptr = get_nextsep(ptr, LIST_SEPARATOR); if(!ptr) { n++; break; @@ -584,8 +598,8 @@ n = 0; while(1) { - last_ptr = ptr; - ptr = get_nextsep(ptr, LIST_SEPARATOR, 1); + last_ptr = const_cast<char*>(ptr); + ptr = get_nextsep(last_ptr, LIST_SEPARATOR, 1); if(!ptr) { res[n] = mp_strdup(last_ptr); n++; @@ -603,9 +617,9 @@ switch(op) { case OP_ADD: - return str_list_add(res,n,dst,0); + return str_list_add(const_cast<const char**>(res),n,dst,0); case OP_PRE: - return str_list_add(res,n,dst,1); + return str_list_add(const_cast<const char**>(res),n,dst,1); case OP_DEL: return str_list_del(res,n,dst); } @@ -617,7 +631,7 @@ return 1; } -static void copy_str_list(const m_option_t* opt,any_t* dst, any_t* src) { +static void copy_str_list(const m_option_t* opt,any_t* dst,const any_t* src) { int n; char **d,**s; UNUSED(opt); @@ -642,7 +656,7 @@ VAL(dst) = d; } -static char* print_str_list(const m_option_t* opt, any_t* src) { +static char* print_str_list(const m_option_t* opt,const any_t* src) { char **lst = NULL; char *ret = NULL,*last = NULL; int i; @@ -698,7 +712,7 @@ /////////////////// Print -static int parse_print(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_print(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { UNUSED(src); UNUSED(dst); UNUSED(param); @@ -757,7 +771,7 @@ #undef VAL #define VAL(x) (*(char***)(x)) -static int parse_subconf(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_subconf(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { char *subparam; char *subopt; int nr = 0,i,r; @@ -798,7 +812,7 @@ } else if (p[0] == '%') { p = &p[1]; optlen = (int)strtol(p, (char**)&p, 0); - if (!p || p[0] != '%' || (optlen > strlen(p) - 1)) { + if (!p || p[0] != '%' || (unsigned(optlen) > strlen(p) - 1)) { MSG_ERR("Invalid length %i for '%s'\n", optlen, subopt); return M_OPT_INVALID; } @@ -929,7 +943,7 @@ { NULL, 0 } }; -static int parse_imgfmt(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_imgfmt(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { uint32_t fmt = 0; int i; UNUSED(src); @@ -1011,7 +1025,7 @@ { NULL, 0 } }; -static int parse_afmt(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_afmt(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { uint32_t fmt = 0; int i; UNUSED(src); @@ -1075,7 +1089,7 @@ return -1e100; } -static int parse_time(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) +static int parse_time(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { double time; UNUSED(src); @@ -1112,7 +1126,7 @@ // Time or size (-endpos) -static int parse_time_size(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +static int parse_time_size(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { m_time_size_t ts; char unit[4]; double end_at; @@ -1344,7 +1358,7 @@ } static int parse_obj_params(const m_option_t* opt,const char *name, - char *param, any_t* dst, int src) { + const char *param, any_t* dst, int src) { char** opts; int r; m_obj_params_t* p = reinterpret_cast<m_obj_params_t*>(opt->priv); @@ -1456,9 +1470,9 @@ return 1; } -static void free_obj_settings_list(any_t* dst); +static void free_obj_settings_list(const any_t* dst); -static int obj_settings_list_del(const char *opt_name,char *param,any_t* dst, int src) { +static int obj_settings_list_del(const char *opt_name,const char *param,any_t* dst, int src) { char** str_list = NULL; int r,i,idx_max = 0; const char* rem_id = "_removed_marker_"; @@ -1517,7 +1531,7 @@ } static int parse_obj_settings_list(const m_option_t* opt,const char *name, - char *param, any_t* dst, int src) { + const char *param, any_t* dst, int src) { int n = 0,r,len = strlen(opt->name); char *str; char *ptr, *last_ptr; @@ -1654,7 +1668,7 @@ return 1; } -static void free_obj_settings_list(any_t* dst) { +static void free_obj_settings_list(const any_t* dst) { int n; m_obj_settings_t *d; @@ -1671,7 +1685,7 @@ VAL(dst) = NULL; } -static void copy_obj_settings_list(const m_option_t* opt,any_t* dst, any_t* src) { +static void copy_obj_settings_list(const m_option_t* opt,any_t* dst,const any_t* src) { m_obj_settings_t *d,*s; int n; UNUSED(opt); @@ -1712,7 +1726,7 @@ }; static int parse_obj_presets(const m_option_t* opt,const char *name, - char *param, any_t* dst, int src) { + const char *param, any_t* dst, int src) { m_obj_presets_t* obj_p = (m_obj_presets_t*)opt->priv; m_struct_t *in_desc,*out_desc; int s,i; @@ -1785,7 +1799,7 @@ #ifdef HAVE_STREAMING static int parse_custom_url(const m_option_t* opt,const char *name, - char *url, any_t* dst, int src) { + const char *url, any_t* dst, int src) { int pos1, pos2, r, v6addr = 0; char *ptr1=NULL, *ptr2=NULL, *ptr3=NULL, *ptr4=NULL; m_struct_t* desc = reinterpret_cast<m_struct_t*>(opt->priv); @@ -1796,7 +1810,7 @@ } // extract the protocol - ptr1 = strstr(url, "://"); + ptr1 = strstr(const_cast<char*>(url), "://"); if( ptr1==NULL ) { // Filename only if(m_option_list_find(desc->fields,"filename")) { Modified: mplayerxp/libmpconf/m_option.h =================================================================== --- mplayerxp/libmpconf/m_option.h 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/libmpconf/m_option.h 2012-12-12 15:25:16 UTC (rev 550) @@ -161,7 +161,7 @@ * \return On error a negative value is returned, on success the number of arguments * consumed. For details see \ref OptionParserReturn. */ - int (*parse)(const m_option_t* opt,const char *name, char *param, any_t* dst, int src); + int (*parse)(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src); /// Print back a value in string form. /** \param opt The option to print. @@ -169,7 +169,7 @@ * \return An allocated string containing the text value or (any_t*)-1 * on error. */ - char* (*print)(const m_option_t* opt, any_t* val); + char* (*print)(const m_option_t* opt,const any_t* val); /** \name * These functions are called to save/set/restore the status of the @@ -184,21 +184,21 @@ * \param dst Pointer to the destination memory. * \param src Pointer to the source memory. */ - void (*save)(const m_option_t* opt,any_t* dst, any_t* src); + void (*save)(const m_option_t* opt,any_t* dst,const any_t* src); /// Set the value in the program (dst) from a save slot. /** \param opt The option to copy. * \param dst Pointer to the destination memory. * \param src Pointer to the source memory. */ - void (*set)(const m_option_t* opt,any_t* dst, any_t* src); + void (*set)(const m_option_t* opt,any_t* dst,const any_t* src); /// Copy the data between two save slots. If NULL and size is > 0 a memcpy will be used. /** \param opt The option to copy. * \param dst Pointer to the destination memory. * \param src Pointer to the source memory. */ - void (*copy)(const m_option_t* opt,any_t* dst, any_t* src); + void (*copy)(const m_option_t* opt,any_t* dst,const any_t* src); //@} /// Free the data allocated for a save slot. @@ -206,7 +206,7 @@ * \param dst Pointer to the data, usually a pointer that should be freed and * set to NULL. */ - void (*mp_free)(any_t* dst); + void (*mp_free)(const any_t* dst); }; ///@} @@ -354,13 +354,13 @@ /// Helper to parse options, see \ref m_option_type::parse. inline static int -m_option_parse(const m_option_t* opt,const char *name, char *param, any_t* dst, int src) { +m_option_parse(const m_option_t* opt,const char *name,const char *param, any_t* dst, int src) { return opt->type->parse(opt,name,param,dst,src); } /// Helper to print options, see \ref m_option_type::print. inline static char* -m_option_print(const m_option_t* opt, any_t* val_ptr) { +m_option_print(const m_option_t* opt,const any_t* val_ptr) { if(opt->type->print) return opt->type->print(opt,val_ptr); else @@ -369,21 +369,21 @@ /// Helper around \ref m_option_type::save. inline static void -m_option_save(const m_option_t* opt,any_t* dst, any_t* src) { +m_option_save(const m_option_t* opt,any_t* dst,const any_t* src) { if(opt->type->save) opt->type->save(opt,dst,src); } /// Helper around \ref m_option_type::set. inline static void -m_option_set(const m_option_t* opt,any_t* dst, any_t* src) { +m_option_set(const m_option_t* opt,any_t* dst,const any_t* src) { if(opt->type->set) opt->type->set(opt,dst,src); } /// Helper around \ref m_option_type::copy. inline static void -m_option_copy(const m_option_t* opt,any_t* dst, any_t* src) { +m_option_copy(const m_option_t* opt,any_t* dst,const any_t* src) { if(opt->type->copy) opt->type->copy(opt,dst,src); else if(opt->type->size > 0) @@ -392,7 +392,7 @@ /// Helper around \ref m_option_type::mp_free. inline static void -m_option_free(const m_option_t* opt,any_t* dst) { +m_option_free(const m_option_t* opt,const any_t* dst) { if(opt->type->mp_free) opt->type->mp_free(dst); } Modified: mplayerxp/libmpconf/m_property.cpp =================================================================== --- mplayerxp/libmpconf/m_property.cpp 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/libmpconf/m_property.cpp 2012-12-12 15:25:16 UTC (rev 550) @@ -99,10 +99,10 @@ return do_action(prop_list,name,action,arg,ctx); } -char* m_properties_expand_string(m_option_t* prop_list,char* str, any_t*ctx) { +char* m_properties_expand_string(m_option_t* prop_list,const char* str, any_t*ctx) { int l,fr=0,pos=0,size=strlen(str)+512; - char *e,*ret = new char [size], num_val; - const char* p=NULL; + char *ret = new char [size], num_val; + const char* e,*p=NULL; int skip = 0, lvl = 0, skip_lvl = 0; while(str[0]) { Modified: mplayerxp/libmpconf/m_property.h =================================================================== --- mplayerxp/libmpconf/m_property.h 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/libmpconf/m_property.h 2012-12-12 15:25:16 UTC (rev 550) @@ -103,7 +103,7 @@ * \param str The string to expand. * \return The newly allocated expanded string. */ -char* m_properties_expand_string(m_option_t* prop_list,char* str, any_t*ctx); +char* m_properties_expand_string(m_option_t* prop_list,const char* str, any_t*ctx); // Helpers to use MPlayer's properties Modified: mplayerxp/libmpconf/m_struct.cpp =================================================================== --- mplayerxp/libmpconf/m_struct.cpp 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/libmpconf/m_struct.cpp 2012-12-12 15:25:16 UTC (rev 550) @@ -52,7 +52,7 @@ } int -m_struct_set(const m_struct_t* st, any_t* obj,const char* field, char* param) { +m_struct_set(const m_struct_t* st, any_t* obj,const char* field,const char* param) { const m_option_t* f = m_struct_get_field(st,field); if(!f) { Modified: mplayerxp/libmpconf/m_struct.h =================================================================== --- mplayerxp/libmpconf/m_struct.h 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/libmpconf/m_struct.h 2012-12-12 15:25:16 UTC (rev 550) @@ -67,7 +67,7 @@ * \return 0 on error, 1 on success. */ int -m_struct_set(const m_struct_t* st, any_t* obj,const char* field, char* param); +m_struct_set(const m_struct_t* st, any_t* obj,const char* field,const char* param); /// Reset a field (or all if field == NULL) to defaults. /** \param st Struct definition. Modified: mplayerxp/libplaytree/asxparser.cpp =================================================================== --- mplayerxp/libplaytree/asxparser.cpp 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/libplaytree/asxparser.cpp 2012-12-12 15:25:16 UTC (rev 550) @@ -16,139 +16,17 @@ #define MSGT_CLASS MSGT_PLAYTREE #include "mp_msg.h" -////// List utils namespace mpxp { -static void __FASTCALL__ asx_list_add(any_t* list_ptr,any_t* entry){ - any_t** list = *(any_t***)list_ptr; - int c = 0; - if(list != NULL) - for( ; list[c] != NULL; c++) ; - - list = (any_t**)mp_realloc(list,sizeof(any_t*)*(c+2)); - - list[c] = entry; - list[c+1] = NULL; - - *(any_t***)list_ptr = list; -} - - -static void __FASTCALL__ asx_list_remove(any_t* list_ptr,any_t* entry,ASX_FreeFunc free_func) { - any_t** list = *(any_t***)list_ptr; - int c,e = -1; - - if(list == NULL) return; - - for(c = 0 ; list[c] != NULL; c++){ - if(list[c] == entry) e = c; - } - - if(e == -1) return; // Not found - - if(free_func != NULL) free_func(list[e]); - - if(c == 1) { // Only one entry, we drop all - delete list; - *(any_t**)list_ptr = NULL; - return; - } - - if(c > e) // If c==e the memmove is not needed - memmove(list+e,list+e+1,(c-e)*sizeof(any_t*)); - - list = (any_t**)mp_realloc(list,(c-1)*sizeof(any_t*)); - list[c-1] = NULL; - - *(any_t***)list_ptr = list; -} - -void __FASTCALL__ asx_list_free(any_t* list_ptr,ASX_FreeFunc free_func) { - any_t** ptr = *(any_t***)list_ptr; - if(ptr == NULL) return; - if(free_func != NULL) { - for( ; *ptr != NULL ; ptr++) - free_func(*ptr); - } - delete *(any_t**)list_ptr; - *(any_t**)list_ptr = NULL; -} - -/////// Attribs utils - -char* __FASTCALL__ asx_get_attrib(const char* attrib,char** attribs) { - char** ptr; - - if(attrib == NULL || attribs == NULL) return NULL; - for(ptr = attribs; ptr[0] != NULL; ptr += 2){ - if(strcasecmp(ptr[0],attrib) == 0) return mp_strdup(ptr[1]); - } - return NULL; -} - -int __FASTCALL__ asx_attrib_to_enum(const char* val,const char** valid_vals) { - const char** ptr; - int r = 0; - - if(valid_vals == NULL || val == NULL) return -2; - for(ptr = valid_vals ; ptr[0] != NULL ; ptr++) { - if(strcasecmp(val,ptr[0]) == 0) return r; - r++; - } - return -1; -} - -void ASX_Parser::warning_attrib_invalid(char* elem, char* attrib, - const char** valid_vals,char* val) const -{ - char *str,*vals; - const char **ptr; - int len; - - if(valid_vals == NULL || valid_vals[0] == NULL) return; - - len = strlen(valid_vals[0]) + 1; - for(ptr = valid_vals+1 ; ptr[0] != NULL; ptr++) { - len += strlen(ptr[0]); - len += ((ptr[1] == NULL) ? 4 : 2); - } - str = vals = new char[len]; - vals += sprintf(vals,"%s",valid_vals[0]); - for(ptr = valid_vals + 1 ; ptr[0] != NULL ; ptr++) { - if(ptr[1] == NULL) vals += sprintf(vals," or %s",ptr[0]); - else vals += sprintf(vals,", %s",ptr[0]); - } - MSG_ERR("at line %d : attribute %s of element %s is invalid (%s). Valid values are %s", - line,attrib,elem,val,str); - delete str; -} - -int ASX_Parser::get_yes_no_attrib(char* element, char* attrib,char** cattribs,int def) const { - char* val = asx_get_attrib(attrib,cattribs); - const char* valids[] = { "NO", "YES", NULL }; - int r; - - if(val == NULL) return def; - r = asx_attrib_to_enum(val,valids); - - if(r < 0) { - warning_attrib_invalid(element,attrib,valids,val); - r = def; - } - delete val; - return r; -} - void ASX_Parser::warning_attrib_required(const char *e, const char *a) const { MSG_WARN("At line %d : element %s don't have the required attribute %s",line,e,a); } void ASX_Parser::warning_body_parse_error(const char *e) const { MSG_WARN("At line %d : error while parsing %s body",line,e); } ASX_Parser::ASX_Parser() {} ASX_Parser::~ASX_Parser() { if(ret_stack) delete ret_stack; } -int ASX_Parser::parse_attribs(char* buffer,char*** _attribs) const { +int ASX_Parser::parse_attribs(char* buffer,ASX_Attrib& _attribs) const { char *ptr1, *ptr2, *ptr3; int n_attrib = 0; - char **cattribs = NULL; char *attrib, *val; ptr1 = buffer; @@ -177,7 +55,7 @@ ptr1++; ptr2 = strchr(ptr1,'"'); if (ptr2 == NULL) { - MSG_WARN("At line %d : value of attribute %s isn't finished",line,attrib); + MSG_WARN("At line %d : value of attribute %s isn't finished\n",line,attrib); delete attrib; break; } @@ -186,16 +64,11 @@ val[ptr2-ptr1] = '\0'; n_attrib++; - cattribs = (char**)mp_realloc(cattribs,(2*n_attrib+1)*sizeof(char*)); - cattribs[n_attrib*2-2] = attrib; - cattribs[n_attrib*2-1] = val; + _attribs.set(attrib,val); ptr1 = ptr2+1; } pa_end: - if(n_attrib > 0) - cattribs[n_attrib*2-0] = NULL; - *_attribs = cattribs; return n_attrib; } @@ -203,7 +76,7 @@ * Return -1 on error, 0 when nothing is found, 1 on sucess */ int ASX_Parser::get_element(const char** _buffer, char** _element, - char** _body,char*** _attribs) { + char** _body,ASX_Attrib& _attribs) { const char *ptr1,*ptr2, *ptr3, *ptr4; char *cattribs = NULL; char *element = NULL, *body = NULL; @@ -212,13 +85,13 @@ int n_attrib = 0; int body_line = 0,attrib_line,ret_line,in = 0; - if(_buffer == NULL || _element == NULL || _body == NULL || _attribs == NULL) { + if(_buffer == NULL || _element == NULL || _body == NULL) { MSG_ERR("At line %d : asx_get_element called with invalid value",line); return -1; } + _attribs.clear(); *_body = *_element = NULL; - *_attribs = NULL; buffer = *_buffer; if(buffer == NULL) return 0; @@ -402,8 +275,7 @@ delete body; return -1; } - } else - *_attribs = NULL; + } else _attribs.clear(); *_element = element; *_body = body; @@ -420,48 +292,43 @@ return 1; } -void ASX_Parser::param(char** cattribs, play_tree_t* pt) const { - const char *name,*val; +void ASX_Parser::param(ASX_Attrib& cattribs, play_tree_t* pt) const { + std::string name,val; - name = asx_get_attrib("NAME",cattribs); - if(!name) { + name = cattribs.get("NAME"); + if(name.empty()) { warning_attrib_required("PARAM" ,"NAME" ); return; } - val = asx_get_attrib("VALUE",cattribs); - if(m_config_get_option(mpxp_context().mconfig,name) == NULL) { - MSG_WARN("Found unknow param in asx: %s",name); - if(val) MSG_WARN("=%s\n",val); - else MSG_WARN("\n"); + val = cattribs.get("VALUE"); + if(m_config_get_option(mpxp_context().mconfig,name.c_str()) == NULL) { + MSG_WARN("Found unknow param in asx: %s",name.c_str()); + if(!val.empty())MSG_WARN("=%s\n",val.c_str()); + else MSG_WARN("\n"); return; } - play_tree_set_param(pt,name,val); + play_tree_set_param(pt,mp_strdup(name.c_str()),mp_strdup(val.c_str())); } -void ASX_Parser::ref(char** cattribs, play_tree_t* pt) const { - char *href; +void ASX_Parser::ref(ASX_Attrib& cattribs, play_tree_t* pt) const { + std::string href; - href = asx_get_attrib("HREF",cattribs); - if(href == NULL) { + href = cattribs.get("HREF"); + if(href.empty()) { warning_attrib_required("REF" ,"HREF" ); return; } // replace http my mmshttp to avoid infinite loops - if (strncmp(href, "http://", 7) == 0) { - char *newref = new char [3 + strlen(href) + 1]; - strcpy(newref, "mms"); - strcpy(newref + 3, href); - delete href; - href = newref; + if (href.substr(0,7)=="http://") { + href = "mms"+href; } - play_tree_add_file(pt,href); - MSG_V("Adding file %s to element entry\n",href); - delete href; + play_tree_add_file(pt,mp_strdup(href.c_str())); + MSG_V("Adding file %s to element entry\n",href.c_str()); } -play_tree_t* ASX_Parser::entryref(libinput_t* libinput,char* buffer,char** _attribs) const { +play_tree_t* ASX_Parser::entryref(libinput_t* libinput,char* buffer,ASX_Attrib& _attribs) const { play_tree_t* pt; - char *href; + std::string href; Stream* stream; play_tree_parser_t* ptp; int f; @@ -469,23 +336,23 @@ if(deep > 0) return NULL; - href = asx_get_attrib("HREF",_attribs); - if(href == NULL) { + href = _attribs.get("HREF"); + if(href.empty()) { warning_attrib_required("ENTRYREF" ,"HREF" ); return NULL; } stream=new(zeromem) Stream; if(stream->open(libinput,href,&f)!=MPXP_Ok) { - MSG_WARN("Can't open playlist %s\n",href); + MSG_WARN("Can't open playlist %s\n",href.c_str()); delete stream; return NULL; } if(!(stream->type() & Stream::Type_Text)) { - MSG_WARN("URL %s dont point to a playlist\n",href); + MSG_WARN("URL %s dont point to a playlist\n",href.c_str()); delete stream; return NULL; } - MSG_V("Adding playlist %s to element entryref\n",href); + MSG_V("Adding playlist %s to element entryref\n",href.c_str()); ptp = play_tree_parser_new(stream,deep+1); pt = play_tree_parser_get_play_tree(libinput,ptp); play_tree_parser_free(ptp); @@ -494,8 +361,9 @@ return pt; } -play_tree_t* ASX_Parser::entry(const char* buffer,char** _attribs) { - char *celement,*body,**cattribs; +play_tree_t* ASX_Parser::entry(const char* buffer,ASX_Attrib& _attribs) { + char *celement,*body; + ASX_Attrib cattribs; int r,nref=0; play_tree_t *pt_ref; UNUSED(_attribs); @@ -503,7 +371,7 @@ pt_ref = play_tree_new(); while(buffer && buffer[0] != '\0') { - r = get_element(&buffer,&celement,&body,&cattribs); + r = get_element(&buffer,&celement,&body,cattribs); if(r < 0) { warning_body_parse_error("ENTRY"); return NULL; @@ -514,7 +382,6 @@ nref++; } else MSG_DBG2("Ignoring element %s\n",celement); if(body) delete body; - asx_free_attribs(cattribs); } if(nref <= 0) { play_tree_free(pt_ref,1); @@ -523,27 +390,27 @@ return pt_ref; } -play_tree_t* ASX_Parser::repeat(libinput_t*libinput,const char* buffer,char** _attribs) { - char *element,*body,**cattribs; +play_tree_t* ASX_Parser::repeat(libinput_t*libinput,const char* buffer,ASX_Attrib& _attribs) { + char *element,*body; + ASX_Attrib cattribs; play_tree_t *pt_repeat, *list=NULL, *pt_entry; - char* count; + std::string count; int r; pt_repeat = play_tree_new(); - count = asx_get_attrib("COUNT",_attribs); - if(count == NULL) { + count = _attribs.get("COUNT"); + if(count.empty()) { MSG_DBG2("Setting element repeat loop to infinit\n"); pt_repeat->loop = -1; // Infinit } else { - pt_repeat->loop = atoi(count); - delete count; + pt_repeat->loop = ::atoi(count.c_str()); if(pt_repeat->loop == 0) pt_repeat->loop = 1; MSG_DBG2("Setting element repeat loop to %d\n",pt_repeat->loop); } while(buffer && buffer[0] != '\0') { - r = get_element(&buffer,&element,&body,&cattribs); + r = get_element(&buffer,&element,&body,cattribs); if(r < 0) { warning_body_parse_error("REPEAT"); return NULL; @@ -573,7 +440,6 @@ param(cattribs,pt_repeat); } else MSG_DBG2("Ignoring element %s\n",element); if(body) delete body; - asx_free_attribs(cattribs); } if(!list) { @@ -585,7 +451,8 @@ } play_tree_t* ASX_Parser::build_tree(libinput_t*libinput,const char* buffer,int deep) { - char *element,*asx_body,**asx_attribs,*body, **attribs; + char *element,*asx_body,*body; + ASX_Attrib asx_attribs,attribs; int r; play_tree_t *asx,*pt_entry,*list = NULL; ASX_Parser& parser = *new(zeromem) ASX_Parser; @@ -593,7 +460,7 @@ parser.line = 1; parser.deep = deep; - r = parser.get_element(&buffer,&element,&asx_body,&asx_attribs); + r = parser.get_element(&buffer,&element,&asx_body,asx_attribs); if(r < 0) { MSG_ERR("At line %d : Syntax error ???",parser.line); delete &parser; @@ -606,7 +473,6 @@ if(strcasecmp(element,"ASX") != 0) { MSG_ERR("first element isn't ASX, it's %s\n",element); - asx_free_attribs(asx_attribs); if(body) delete body; delete &parser; return NULL; @@ -614,7 +480,6 @@ if(!asx_body) { MSG_ERR("ASX element is empty"); - asx_free_attribs(asx_attribs); delete &parser; return NULL; } @@ -622,7 +487,7 @@ asx = play_tree_new(); buffer = asx_body; while(buffer && buffer[0] != '\0') { - r = parser.get_element(&buffer,&element,&body,&attribs); + r = parser.get_element(&buffer,&element,&body,attribs); if(r < 0) { parser.warning_body_parse_error("ASX"); delete &parser; @@ -651,11 +516,9 @@ } } else MSG_DBG2("Ignoring element %s\n",element); if(body) delete body; - asx_free_attribs(attribs); } delete asx_body; - asx_free_attribs(asx_attribs); delete &parser; if(!list) { Modified: mplayerxp/libplaytree/asxparser.h =================================================================== --- mplayerxp/libplaytree/asxparser.h 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/libplaytree/asxparser.h 2012-12-12 15:25:16 UTC (rev 550) @@ -1,17 +1,33 @@ #ifndef ASXPARSER_H #define ASXPARSER_H 1 - #include "osdep/mplib.h" #include "playtree.h" - using namespace mpxp; +#include <string> +#include <map> + namespace mpxp { struct ASX_LineSave_t { const char* buffer; int line; }; + class ASX_Attrib { + public: + ASX_Attrib() {} + ~ASX_Attrib() {} + + struct stricomp { int operator() (const std::string& lhs, const std::string& rhs) const { return strcasecmp(lhs.c_str(),rhs.c_str()); }}; + + std::string get(const std::string& key) { return _attrib[key]; } + void set(const std::string& key,const std::string& value) { _attrib[key]=value; } + void clear() { _attrib.clear(); } + std::map<std::string,std::string,ASX_Attrib::stricomp>& map() { return _attrib; } + private: + std::map<std::string,std::string,ASX_Attrib::stricomp> _attrib; + }; + class ASX_Parser : public Opaque { public: ASX_Parser(); @@ -19,42 +35,26 @@ static play_tree_t* build_tree(libinput_t* libinput,const char* buffer, int ref); - virtual int parse_attribs(char* buffer,char*** _attribs) const; + virtual int parse_attribs(char* buffer,ASX_Attrib& _attribs) const; /* * Return -1 on error, 0 when nothing is found, 1 on sucess */ - virtual int get_element(const char** _buffer,char** _element,char** _body,char*** _attribs); + virtual int get_element(const char** _buffer,char** _element,char** _body,ASX_Attrib& _attribs); int get_line() const { return line; } private: - play_tree_t* repeat(libinput_t*libinput,const char* buffer,char** _attribs); - void warning_attrib_invalid(char* elem, char* attrib,const char** valid_vals,char* val) const; + play_tree_t* repeat(libinput_t*libinput,const char* buffer,ASX_Attrib& _attribs); void warning_attrib_required(const char *e, const char *a) const; void warning_body_parse_error(const char *e) const; - int get_yes_no_attrib(char* element, char* attrib,char** attribs,int def) const; - void param(char** attribs, play_tree_t* pt) const; - void ref(char** attribs, play_tree_t* pt) const; - play_tree_t* entryref(libinput_t* libinput,char* buffer,char** _attribs) const; - play_tree_t* entry(const char* buffer,char** _attribs); + void param(ASX_Attrib& attribs, play_tree_t* pt) const; + void ref(ASX_Attrib& attribs, play_tree_t* pt) const; + play_tree_t* entryref(libinput_t* libinput,char* buffer,ASX_Attrib& _attribs) const; + play_tree_t* entry(const char* buffer,ASX_Attrib& _attribs); int line; // Curent line ASX_LineSave_t* ret_stack; int ret_stack_size; char* last_body; int deep; -}; - -/////// Attribs utils - -extern char* __FASTCALL__ asx_get_attrib(const char* attrib,char** attribs); - -extern int __FASTCALL__ asx_attrib_to_enum(const char* val,char** valid_vals); - -////// List utils - -typedef void (* __FASTCALL__ ASX_FreeFunc)(any_t* arg); - -extern void __FASTCALL__ asx_list_free(any_t* list_ptr,ASX_FreeFunc free_func); - -static inline void asx_free_attribs(any_t*a) { asx_list_free(&a,mp_free); } + }; } // namespace mpxp #endif Modified: mplayerxp/postproc/libmenu/menu.cpp =================================================================== --- mplayerxp/postproc/libmenu/menu.cpp 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/postproc/libmenu/menu.cpp 2012-12-12 15:25:16 UTC (rev 550) @@ -47,10 +47,10 @@ }; typedef struct menu_def_st { - char* name; + const char* name; menu_info_t* type; any_t* cfg; - char* args; + const char* args; } menu_def_t; static struct MPContext *menu_ctx = NULL; @@ -59,13 +59,15 @@ static int menu_parse_config(const char* buffer) { - char *element,*body, **attribs, *name; + char *element,*body; + std::string name; + ASX_Attrib attribs; menu_info_t* minfo = NULL; int r,i; ASX_Parser& parser = *new(zeromem) ASX_Parser; while(1) { - r = parser.get_element(&buffer,&element,&body,&attribs); + r = parser.get_element(&buffer,&element,&body,attribs); if(r < 0) { MSG_WARN("[libmenu] Syntax error at line: %i\n",parser.get_line()); delete &parser; @@ -75,12 +77,11 @@ return 1; } // Has it a name ? - name = asx_get_attrib("name",attribs); - if(!name) { + name = attribs.get("name"); + if(name.empty()) { MSG_WARN("[libmenu] Menu definitions need a name attrib: %i\n",parser.get_line()); delete element; if(body) delete body; - asx_free_attribs(attribs); continue; } @@ -93,28 +94,31 @@ } // Got it : add this to our list if(minfo) { - menu_list = (menu_def_t*)mp_realloc(menu_list,(menu_count+2)*sizeof(menu_def_t)); - menu_list[menu_count].name = name; - menu_list[menu_count].type = minfo; - menu_list[menu_count].cfg = m_struct_alloc(&minfo->priv_st); - menu_list[menu_count].args = body; - // Setup the attribs - for(i = 0 ; attribs[2*i] ; i++) { - if(strcasecmp(attribs[2*i],"name") == 0) continue; - if(!m_struct_set(&minfo->priv_st,menu_list[menu_count].cfg,attribs[2*i], attribs[2*i+1])) - MSG_WARN("[libmenu] Bad attrib: %s %s %s %i\n",attribs[2*i],attribs[2*i+1], - name,parser.get_line()); - } - menu_count++; - memset(&menu_list[menu_count],0,sizeof(menu_def_t)); + menu_list = (menu_def_t*)mp_realloc(menu_list,(menu_count+2)*sizeof(menu_def_t)); + menu_list[menu_count].name = mp_strdup(name.c_str()); + menu_list[menu_count].type = minfo; + menu_list[menu_count].cfg = m_struct_alloc(&minfo->priv_st); + menu_list[menu_count].args = body; + std::map<std::string,std::string,ASX_Attrib::stricomp>::iterator it; + std::map<std::string,std::string,ASX_Attrib::stricomp>& _map = attribs.map(); + for(it=_map.begin();it!=_map.end();it++) { + std::string sfirst,ssecond; + sfirst=(*it).first; + ssecond=(*it).second; + if(strcasecmp(sfirst.c_str(),"name") == 0) continue; + // Setup the attribs + if(!m_struct_set(&minfo->priv_st,menu_list[menu_count].cfg,mp_strdup(sfirst.c_str()),mp_strdup(ssecond.c_str()))) + MSG_WARN("[libmenu] Bad attrib: %s %s %s %i\n" + ,sfirst.c_str(),ssecond.c_str(),name.c_str(),parser.get_line()); + } + menu_count++; + memset(&menu_list[menu_count],0,sizeof(menu_def_t)); } else { - MSG_WARN("[libmenu] Unknown menu type: %s %i\n",element,parser.get_line()); - delete name; - if(body) delete body; + MSG_WARN("[libmenu] Unknown menu type: %s %i\n",element,parser.get_line()); + if(body) delete body; } delete element; - asx_free_attribs(attribs); } delete &parser; return 0; @@ -169,7 +173,7 @@ } // Destroy all this stuff -void menu_unint(void) { +void menu_uninit(void) { int i; for(i = 0 ; menu_list && menu_list[i].name ; i++) { delete menu_list[i].name; @@ -219,8 +223,7 @@ return NULL; } for(i = 0 ; menu_list[i].name != NULL ; i++) { - if(strcmp(name,menu_list[i].name) == 0) - break; + if(strcmp(name,menu_list[i].name) == 0) break; } if(menu_list[i].name == NULL) { MSG_WARN("[libmenu] Menu not found: %s\n",name); Modified: mplayerxp/postproc/libmenu/menu.h =================================================================== --- mplayerxp/postproc/libmenu/menu.h 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/postproc/libmenu/menu.h 2012-12-12 15:25:16 UTC (rev 550) @@ -45,7 +45,7 @@ }; /// Global init/uninit int menu_init(struct MPContext *mpctx,const char* cfg_file); -void menu_unint(void); +void menu_uninit(void); /// Open a menu defined in the config file menu_t* menu_open(const char *name,libinput_t*libinput); Modified: mplayerxp/postproc/libmenu/menu_cmdlist.cpp =================================================================== --- mplayerxp/postproc/libmenu/menu_cmdlist.cpp 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/postproc/libmenu/menu_cmdlist.cpp 2012-12-12 15:25:16 UTC (rev 550) @@ -27,10 +27,10 @@ struct list_entry_s { struct list_entry p; - char* ok; - char* cancel; - char* left; - char* right; + const char* ok; + const char* cancel; + const char* left; + const char* right; }; struct menu_priv_s { @@ -109,13 +109,15 @@ } static int parse_args(menu_t* menu,const char* args) { - char *element,*body, **attribs, *name; + char *element,*body; + ASX_Attrib attribs; + std::string name; list_entry_t* m = NULL; int r; ASX_Parser& parser = *new(zeromem) ASX_Parser; while(1) { - r = parser.get_element(&args,&element,&body,&attribs); + r = parser.get_element(&args,&element,&body,attribs); if(r < 0) { MSG_WARN("[libmenu] Syntax error at line: %i\n",parser.get_line()); delete &parser; @@ -127,25 +129,23 @@ return m ? 1 : 0; } // Has it a name ? - name = asx_get_attrib("name",attribs); - if(!name) { + name = attribs.get("name"); + if(name.empty()) { MSG_WARN("[libmenu] ListMenu entry definitions need a name: %i\n",parser.get_line()); delete element; if(body) delete body; - asx_free_attribs(attribs); continue; } m = new(zeromem) struct list_entry_s; - m->p.txt = name; - m->ok = asx_get_attrib("ok",attribs); - m->cancel = asx_get_attrib("cancel",attribs); - m->left = asx_get_attrib("left",attribs); - m->right = asx_get_attrib("right",attribs); + m->p.txt = mp_strdup(name.c_str()); + m->ok = mp_strdup(attribs.get("ok").c_str()); + m->cancel = mp_strdup(attribs.get("cancel").c_str()); + m->left = mp_strdup(attribs.get("left").c_str()); + m->right = mp_strdup(attribs.get("right").c_str()); menu_list_add_entry(menu,m); delete element; if(body) delete body; - asx_free_attribs(attribs); } delete &parser; return -1; Modified: mplayerxp/postproc/libmenu/menu_param.cpp =================================================================== --- mplayerxp/postproc/libmenu/menu_param.cpp 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/postproc/libmenu/menu_param.cpp 2012-12-12 15:25:16 UTC (rev 550) @@ -30,11 +30,11 @@ struct list_entry_s { struct list_entry p; - char* name; - char* txt; - char* prop; + const char* name; + const char* txt; + const char* prop; m_option_t* opt; - char* menu; + const char* menu; }; struct menu_priv_s { @@ -65,7 +65,7 @@ #define mpriv (menu->priv) static void entry_set_text(menu_t* menu, list_entry_t* e) { - const char* val = e->txt ? m_properties_expand_string(reinterpret_cast<m_option_t*>(e->prop), e->txt, menu->ctx) : + const char* val = e->txt ? m_properties_expand_string(e->opt, e->txt, menu->ctx) : mp_property_print(e->prop, menu->ctx); int l,edit = (mpriv->edit && e == mpriv->p.current); if(!val || !val[0]) { @@ -92,14 +92,16 @@ } static int parse_args(menu_t* menu,const char* args) { - char *element,*body, **attribs, *name, *txt; + char *element,*body; + ASX_Attrib attribs; + std::string name,txt; list_entry_t* m = NULL; int r; m_option_t* opt; ASX_Parser& parser = *new(zeromem) ASX_Parser; while(1) { - r = parser.get_element(&args,&element,&body,&attribs); + r = parser.get_element(&args,&element,&body,attribs); if(r < 0) { MSG_ERR("[libmenu] Syntax error at line: %s\n",parser.get_line()); delete &parser; @@ -114,38 +116,36 @@ return 1; } if(!strcmp(element,"menu")) { - name = asx_get_attrib("menu",attribs); - if(!name) { + name = attribs.get("menu"); + if(name.empty()) { MSG_WARN("[libmenu] Submenu definition need a menu attribut\n"); goto next_element; } m = new(zeromem) struct list_entry_s; - m->menu = name; - name = NULL; // we want to keep it - m->p.txt = asx_get_attrib("name",attribs); + m->menu = mp_strdup(name.c_str()); + m->p.txt = mp_strdup(attribs.get("name").c_str()); if(!m->p.txt) m->p.txt = mp_strdup(m->menu); menu_list_add_entry(menu,m); goto next_element; } - name = asx_get_attrib("property",attribs); + name = attribs.get("property"); opt = NULL; - if(name && mp_property_do(name,M_PROPERTY_GET_TYPE,&opt,menu->ctx) <= 0) { + if(!name.empty() && mp_property_do(name.c_str(),M_PROPERTY_GET_TYPE,&opt,menu->ctx) <= 0) { MSG_WARN("[libmenu] Invalid property: %s %i\n", - name,parser.get_line()); + name.c_str(),parser.get_line()); goto next_element; } - txt = asx_get_attrib("txt",attribs); - if(!(name || txt)) { + txt = attribs.get("txt"); + if(name.empty() || txt.empty()) { MSG_WARN("[libmenu] PrefMenu entry definitions need: %i\n",parser.get_line()); - if(txt) { delete txt; txt = NULL; } goto next_element; } m = new(zeromem) struct list_entry_s; m->opt = opt; - m->txt = txt; txt = NULL; - m->prop = name; name = NULL; - m->name = asx_get_attrib("name",attribs); + m->txt = mp_strdup(txt.c_str()); + m->prop = mp_strdup(name.c_str()); + m->name = mp_strdup(attribs.get("name").c_str()); if(!m->name) m->name = mp_strdup(opt ? opt->name : "-"); entry_set_text(menu,m); menu_list_add_entry(menu,m); @@ -153,8 +153,6 @@ next_element: delete element; if(body) delete body; - if(name) delete name; - asx_free_attribs(attribs); } delete &parser; return -1; Modified: mplayerxp/postproc/vf_menu.cpp =================================================================== --- mplayerxp/postproc/vf_menu.cpp 2012-12-12 12:24:11 UTC (rev 549) +++ mplayerxp/postproc/vf_menu.cpp 2012-12-12 15:25:16 UTC (rev 550) @@ -218,6 +218,7 @@ free_mp_image(pause_mpi); pause_mpi = NULL; } + menu_uninit(); } static int __FASTCALL__ vf_config(vf_instance_t* vf, int width, int height, int d_width, int d_height, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |