[MPlayer-cvslog] r31134 - in trunk: LICENSE asxparser.c asxparser.h cfg-common-opts.h cfg-common.h cfg-mencoder.h cfg-mplayer.h codec-cfg.c codec-cfg.h command.c cpudetect.c cpudetect.h cpuinfo.c edl.h

diego subversion at mplayerhq.hu
Tue May 4 01:34:39 CEST 2010


Author: diego
Date: Tue May  4 01:34:38 2010
New Revision: 31134

Log:
the great MPlayer tab removal: part II
some extra indentation fixes are put in as a bonus

Modified:
   trunk/LICENSE
   trunk/asxparser.c
   trunk/asxparser.h
   trunk/cfg-common-opts.h
   trunk/cfg-common.h
   trunk/cfg-mencoder.h
   trunk/cfg-mplayer.h
   trunk/codec-cfg.c
   trunk/codec-cfg.h
   trunk/command.c
   trunk/cpudetect.c
   trunk/cpudetect.h
   trunk/cpuinfo.c
   trunk/edl.h

Modified: trunk/LICENSE
==============================================================================
--- trunk/LICENSE	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/LICENSE	Tue May  4 01:34:38 2010	(r31134)
@@ -1,12 +1,12 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
         51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
-			    Preamble
+                            Preamble
 
   The licenses for most software are designed to take away your
 freedom to share and change it.  By contrast, the GNU General Public
@@ -56,7 +56,7 @@ patent must be licensed for everyone's f
   The precise terms and conditions for copying, distribution and
 modification follow.
 
-		    GNU GENERAL PUBLIC LICENSE
+                    GNU GENERAL PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
   0. This License applies to any program or other work which contains
@@ -255,7 +255,7 @@ make exceptions for this.  Our decision 
 of preserving the free status of all derivatives of our free software and
 of promoting the sharing and reuse of software generally.
 
-			    NO WARRANTY
+                            NO WARRANTY
 
   11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE
 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGES.
 
-		     END OF TERMS AND CONDITIONS
+                     END OF TERMS AND CONDITIONS
 
-	    How to Apply These Terms to Your New Programs
+            How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it

Modified: trunk/asxparser.c
==============================================================================
--- trunk/asxparser.c	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/asxparser.c	Tue May  4 01:34:38 2010	(r31134)
@@ -112,8 +112,8 @@ asx_parse_attribs(ASX_Parser_t* parser,c
     if(ptr3 == NULL) break;
     for(ptr2 = ptr3-1; strchr(SPACE,*ptr2) != NULL; ptr2--) {
       if (ptr2 == ptr1) {
-	mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : this should never append, back to attribute begin while skipping end space",parser->line);
-	break;
+        mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : this should never append, back to attribute begin while skipping end space",parser->line);
+        break;
       }
     }
     attrib = malloc(ptr2-ptr1+2);
@@ -159,7 +159,7 @@ asx_parse_attribs(ASX_Parser_t* parser,c
  */
 int
 asx_get_element(ASX_Parser_t* parser,char** _buffer,
-		char** _element,char** _body,char*** _attribs) {
+                char** _element,char** _body,char*** _attribs) {
   char *ptr1,*ptr2, *ptr3, *ptr4;
   char *attribs = NULL;
   char *element = NULL, *body = NULL, *ret = NULL, *buffer;
@@ -183,21 +183,21 @@ asx_get_element(ASX_Parser_t* parser,cha
     int i;
     for(i = 0 ; i < parser->ret_stack_size ; i++) {
       if(buffer == ls[i].buffer) {
-	parser->line = ls[i].line;
-	break;
+        parser->line = ls[i].line;
+        break;
       }
 
     }
     if( i < parser->ret_stack_size) {
       i++;
       if( i < parser->ret_stack_size)
-	memmove(parser->ret_stack,parser->ret_stack+i, (parser->ret_stack_size - i)*sizeof(ASX_LineSave_t));
+        memmove(parser->ret_stack,parser->ret_stack+i, (parser->ret_stack_size - i)*sizeof(ASX_LineSave_t));
       parser->ret_stack_size -= i;
       if(parser->ret_stack_size > 0)
-	parser->ret_stack = realloc(parser->ret_stack,parser->ret_stack_size*sizeof(ASX_LineSave_t));
+        parser->ret_stack = realloc(parser->ret_stack,parser->ret_stack_size*sizeof(ASX_LineSave_t));
       else {
-	free(parser->ret_stack);
-	parser->ret_stack = NULL;
+        free(parser->ret_stack);
+        parser->ret_stack = NULL;
       }
     }
   }
@@ -206,8 +206,8 @@ asx_get_element(ASX_Parser_t* parser,cha
   while(1) {
     for( ; ptr1[0] != '<' ; ptr1++) {
       if(ptr1[0] == '\0') {
-	ptr1 = NULL;
-	break;
+        ptr1 = NULL;
+        break;
       }
       if(ptr1[0] == '\n') parser->line++;
     }
@@ -216,16 +216,16 @@ asx_get_element(ASX_Parser_t* parser,cha
 
     if(strncmp(ptr1,"<!--",4) == 0) { // Comments
       for( ; strncmp(ptr1,"-->",3) != 0 ; ptr1++) {
-	if(ptr1[0] == '\0') {
-	  ptr1 = NULL;
-	  break;
-	}
-	if(ptr1[0] == '\n') parser->line++;
+        if(ptr1[0] == '\0') {
+          ptr1 = NULL;
+          break;
+        }
+        if(ptr1[0] == '\n') parser->line++;
       }
       //ptr1 = strstr(ptr1,"-->");
       if(!ptr1) {
-	mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : unfinished comment",parser->line);
-	return -1;
+        mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : unfinished comment",parser->line);
+        return -1;
       }
     } else {
       break;
@@ -288,10 +288,10 @@ asx_get_element(ASX_Parser_t* parser,cha
     ptr3++;
     for( ; strchr(SPACE,*ptr3) != NULL; ptr3++) { // Skip space on body begin
       if(*ptr3 == '\0') {
-	mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : EOB reached while parsing %s element body",parser->line,element);
-	free(element);
-	if(attribs) free(attribs);
-	return -1;
+        mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : EOB reached while parsing %s element body",parser->line,element);
+        free(element);
+        if(attribs) free(attribs);
+        return -1;
       }
       if(ptr3[0] == '\n') parser->line++;
     }
@@ -299,52 +299,52 @@ asx_get_element(ASX_Parser_t* parser,cha
     body_line = parser->line;
     while(1) { // Find closing element
       for( ; ptr4[0] != '<' ; ptr4++) {
-	if(ptr4[0] == '\0') {
-	  ptr4 = NULL;
-	  break;
-	}
-	if(ptr4[0] == '\n') parser->line++;
+        if(ptr4[0] == '\0') {
+          ptr4 = NULL;
+          break;
+        }
+        if(ptr4[0] == '\n') parser->line++;
       }
       if(ptr4 && strncmp(ptr4,"<!--",4) == 0) { // Comments
-	for( ; strncmp(ptr4,"-->",3) != 0 ; ptr4++) {
-	if(ptr4[0] == '\0') {
-	  ptr4 = NULL;
-	  break;
-	}
-	if(ptr1[0] == '\n') parser->line++;
-	}
-	continue;
+        for( ; strncmp(ptr4,"-->",3) != 0 ; ptr4++) {
+        if(ptr4[0] == '\0') {
+          ptr4 = NULL;
+          break;
+        }
+        if(ptr1[0] == '\n') parser->line++;
+        }
+        continue;
       }
       if(ptr4 == NULL || ptr4[1] == '\0') {
-	mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : EOB reached while parsing %s element body",parser->line,element);
-	free(element);
-	if(attribs) free(attribs);
-	return -1;
+        mp_msg(MSGT_PLAYTREE,MSGL_ERR,"At line %d : EOB reached while parsing %s element body",parser->line,element);
+        free(element);
+        if(attribs) free(attribs);
+        return -1;
       }
       if(ptr4[1] != '/' && strncasecmp(element,ptr4+1,strlen(element)) == 0) {
-	in++;
-	ptr4+=2;
-	continue;
+        in++;
+        ptr4+=2;
+        continue;
       } else if(strncasecmp(element,ptr4+2,strlen(element)) == 0) { // Extract body
-	if(in > 0) {
-	  in--;
-	  ptr4 += 2+strlen(element);
-	  continue;
-	}
-	ret = ptr4+strlen(element)+3;
-	if(ptr4 != ptr3) {
-	  ptr4--;
-	  for( ; ptr4 != ptr3 && strchr(SPACE,*ptr4) != NULL; ptr4--) ;// Skip space on body end
-	  //	    if(ptr4[0] == '\0') parser->line--;
-	  //}
-	  ptr4++;
-	  body = malloc(ptr4-ptr3+1);
-	  strncpy(body,ptr3,ptr4-ptr3);
-	  body[ptr4-ptr3] = '\0';
-	}
-	break;
+        if(in > 0) {
+          in--;
+          ptr4 += 2+strlen(element);
+          continue;
+        }
+        ret = ptr4+strlen(element)+3;
+        if(ptr4 != ptr3) {
+          ptr4--;
+          for( ; ptr4 != ptr3 && strchr(SPACE,*ptr4) != NULL; ptr4--) ;// Skip space on body end
+          //        if(ptr4[0] == '\0') parser->line--;
+          //}
+          ptr4++;
+          body = malloc(ptr4-ptr3+1);
+          strncpy(body,ptr3,ptr4-ptr3);
+          body[ptr4-ptr3] = '\0';
+        }
+        break;
       } else {
-	ptr4 += 2;
+        ptr4 += 2;
       }
     }
   } else {
@@ -543,23 +543,23 @@ asx_parse_repeat(ASX_Parser_t* parser,ch
     if(strcasecmp(element,"ENTRY") == 0) {
        entry = asx_parse_entry(parser,body,attribs);
        if(entry) {
-	 if(!list) list =  entry;
-	 else play_tree_append_entry(list,entry);
-	 mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to repeat\n",element);
+         if(!list) list =  entry;
+         else play_tree_append_entry(list,entry);
+         mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to repeat\n",element);
        }
     } else if(strcasecmp(element,"ENTRYREF") == 0) {
        entry = asx_parse_entryref(parser,body,attribs);
        if(entry) {
-	 if(!list) list =  entry;
-	 else play_tree_append_entry(list,entry);
-	 mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to repeat\n",element);
+         if(!list) list =  entry;
+         else play_tree_append_entry(list,entry);
+         mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to repeat\n",element);
        }
      } else if(strcasecmp(element,"REPEAT") == 0) {
        entry = asx_parse_repeat(parser,body,attribs);
        if(entry) {
-	 if(!list) list =  entry;
-	 else play_tree_append_entry(list,entry);
-	 mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to repeat\n",element);
+         if(!list) list =  entry;
+         else play_tree_append_entry(list,entry);
+         mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to repeat\n",element);
        }
      } else if(strcasecmp(element,"PARAM") == 0) {
        asx_parse_param(parser,attribs,repeat);
@@ -630,23 +630,23 @@ asx_parser_build_tree(char* buffer,int d
      if(strcasecmp(element,"ENTRY") == 0) {
        entry = asx_parse_entry(parser,body,attribs);
        if(entry) {
-	 if(!list) list =  entry;
-	 else play_tree_append_entry(list,entry);
-	 mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to asx\n",element);
+         if(!list) list =  entry;
+         else play_tree_append_entry(list,entry);
+         mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to asx\n",element);
        }
      } else if(strcasecmp(element,"ENTRYREF") == 0) {
        entry = asx_parse_entryref(parser,body,attribs);
        if(entry) {
-	 if(!list) list =  entry;
-	 else play_tree_append_entry(list,entry);
-	 mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to asx\n",element);
+         if(!list) list =  entry;
+         else play_tree_append_entry(list,entry);
+         mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to asx\n",element);
        }
      } else if(strcasecmp(element,"REPEAT") == 0) {
        entry = asx_parse_repeat(parser,body,attribs);
        if(entry) {
-	 if(!list) list =  entry;
-	 else play_tree_append_entry(list,entry);
-	 mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to asx\n",element);
+         if(!list) list =  entry;
+         else play_tree_append_entry(list,entry);
+         mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Adding element %s to asx\n",element);
        }
      } else
        mp_msg(MSGT_PLAYTREE,MSGL_DBG2,"Ignoring element %s\n",element);

Modified: trunk/asxparser.h
==============================================================================
--- trunk/asxparser.h	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/asxparser.h	Tue May  4 01:34:38 2010	(r31134)
@@ -47,7 +47,7 @@ asx_parser_free(ASX_Parser_t* parser);
  */
 int
 asx_get_element(ASX_Parser_t* parser,char** _buffer,
-		char** _element,char** _body,char*** _attribs);
+                char** _element,char** _body,char*** _attribs);
 
 int
 asx_parse_attribs(ASX_Parser_t* parser,char* buffer,char*** _attribs);

Modified: trunk/cfg-common-opts.h
==============================================================================
--- trunk/cfg-common-opts.h	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/cfg-common-opts.h	Tue May  4 01:34:38 2010	(r31134)
@@ -24,351 +24,351 @@
 #include "osdep/priority.h"
 
 // ------------------------- common options --------------------
-	{"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
-	{"really-quiet", &verbose, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_PRE_PARSE, 0, -10, NULL},
-	{"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL},
-	{"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
-	{"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"nomsgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
-	{"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"nomsgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"quiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"noquiet", &quiet, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"really-quiet", &verbose, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_PRE_PARSE, 0, -10, NULL},
+    {"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL},
+    {"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"nomsgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"nomsgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
 #ifdef CONFIG_ICONV
-	{"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 #endif
-	{"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL},
+    {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL},
 #ifdef CONFIG_PRIORITY
-	{"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
-	{"codecpath", &codec_path, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"noconfig", noconfig_opts, CONF_TYPE_SUBCONFIG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL},
+    {"codecpath", &codec_path, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"noconfig", noconfig_opts, CONF_TYPE_SUBCONFIG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL},
 
 // ------------------------- stream options --------------------
 
 #ifdef CONFIG_STREAM_CACHE
-	{"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 32, 1048576, NULL},
-	{"nocache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"cache-min", &stream_cache_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
-	{"cache-seek-min", &stream_cache_seek_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
+    {"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 32, 1048576, NULL},
+    {"nocache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"cache-min", &stream_cache_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
+    {"cache-seek-min", &stream_cache_seek_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
 #else
-	{"cache", "MPlayer was compiled without cache2 support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"cache", "MPlayer was compiled without cache2 support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_STREAM_CACHE */
-	{"vcd", "-vcd N has been removed, use vcd://N instead.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL},
-	{"cuefile", "-cuefile has been removed, use cue://filename:N where N is the track number.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"cdrom-device", &cdrom_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"vcd", "-vcd N has been removed, use vcd://N instead.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL},
+    {"cuefile", "-cuefile has been removed, use cue://filename:N where N is the track number.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"cdrom-device", &cdrom_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #ifdef CONFIG_DVDREAD
-	{"dvd-device", &dvd_device,  CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"dvd-speed", &dvd_speed, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"dvd", "-dvd N has been removed, use dvd://N instead.\n" , CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"dvdangle", &dvd_angle, CONF_TYPE_INT, CONF_RANGE, 1, 99, NULL},
-	{"chapter", dvd_parse_chapter_range, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL},
+    {"dvd-device", &dvd_device,  CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"dvd-speed", &dvd_speed, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"dvd", "-dvd N has been removed, use dvd://N instead.\n" , CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"dvdangle", &dvd_angle, CONF_TYPE_INT, CONF_RANGE, 1, 99, NULL},
+    {"chapter", dvd_parse_chapter_range, CONF_TYPE_FUNC_PARAM, 0, 0, 0, NULL},
 #else
-	{"dvd-device", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"dvd-speed", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"dvd", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"dvd-device", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"dvd-speed", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"dvd", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_DVDREAD */
-	{"alang", &audio_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"slang", &dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"alang", &audio_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"slang", &dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
 
-        {"dvdauth", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-        {"dvdkey", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"csslib", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"dvdauth", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"dvdkey", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"csslib", "libcss is obsolete. Try libdvdread instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 
 #ifdef CONFIG_NETWORK
-	{"user", &network_username, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"passwd", &network_password, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"bandwidth", &network_bandwidth, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
-	{"user-agent", &network_useragent, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"cookies", &network_cookies_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nocookies", &network_cookies_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"cookies-file", &cookies_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"prefer-ipv4", &network_prefer_ipv4, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"ipv4-only-proxy", &network_ipv4_only_proxy, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"reuse-socket", &reuse_socket, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"noreuse-socket", &reuse_socket, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"user", &network_username, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"passwd", &network_password, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"bandwidth", &network_bandwidth, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
+    {"user-agent", &network_useragent, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"cookies", &network_cookies_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nocookies", &network_cookies_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"cookies-file", &cookies_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"prefer-ipv4", &network_prefer_ipv4, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"ipv4-only-proxy", &network_ipv4_only_proxy, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"reuse-socket", &reuse_socket, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"noreuse-socket", &reuse_socket, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
 #ifdef HAVE_AF_INET6
-	{"prefer-ipv6", &network_prefer_ipv4, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"prefer-ipv6", &network_prefer_ipv4, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 #else
-	{"prefer-ipv6", "MPlayer was compiled without IPv6 support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"prefer-ipv6", "MPlayer was compiled without IPv6 support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif /* HAVE_AF_INET6 */
 
 #else
-	{"user", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"passwd", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"bandwidth", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"user-agent", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"user", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"passwd", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"bandwidth", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"user-agent", "MPlayer was compiled without streaming (network) support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_NETWORK */
 
 #ifdef CONFIG_LIVE555
-        {"sdp", "-sdp has been removed, use sdp://file instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"sdp", "-sdp has been removed, use sdp://file instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif /* CONFIG_LIVE555 */
 #if defined(CONFIG_LIBNEMESI) || defined(CONFIG_LIVE555)
-	// -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP
-        {"rtsp-stream-over-tcp", &rtsp_transport_tcp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    // -rtsp-stream-over-tcp option, specifying TCP streaming of RTP/RTCP
+    {"rtsp-stream-over-tcp", &rtsp_transport_tcp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #else
-	{"rtsp-stream-over-tcp", "-rtsp-stream-over-tcp requires the \"LIVE555 Streaming Media\" or \"libnemesi\" libraries.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"rtsp-stream-over-tcp", "-rtsp-stream-over-tcp requires the \"LIVE555 Streaming Media\" or \"libnemesi\" libraries.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* defined(CONFIG_LIBNEMESI) || defined(CONFIG_LIVE555) */
 #ifdef CONFIG_LIBNEMESI
-        {"rtsp-stream-over-sctp", &rtsp_transport_sctp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"rtsp-stream-over-sctp", &rtsp_transport_sctp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #else
-        {"rtsp-stream-over-sctp", "-rtsp-stream-over-sctp requires the \"libnemesi\" library\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"rtsp-stream-over-sctp", "-rtsp-stream-over-sctp requires the \"libnemesi\" library\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_LIBNEMESI */
 #ifdef CONFIG_NETWORK
-        {"rtsp-port", &rtsp_port, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL},
-        {"rtsp-destination", &rtsp_destination, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL},
+    {"rtsp-port", &rtsp_port, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL},
+    {"rtsp-destination", &rtsp_destination, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL},
 #else
-        {"rtsp-port", "MPlayer was compiled without network support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-        {"rtsp-destination", "MPlayer was compiled without network support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"rtsp-port", "MPlayer was compiled without network support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"rtsp-destination", "MPlayer was compiled without network support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_NETWORK */
 
 // ------------------------- demuxer options --------------------
 
-	// number of frames to play/convert
-	{"frames", &play_n_frames_mf, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
+    // number of frames to play/convert
+    {"frames", &play_n_frames_mf, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
 
-	// seek to byte/seconds position
-	{"sb", &seek_to_byte, CONF_TYPE_POSITION, CONF_MIN, 0, 0, NULL},
-	{"ss", &seek_to_sec, CONF_TYPE_TIME, 0, 0, 0, NULL},
+    // seek to byte/seconds position
+    {"sb", &seek_to_byte, CONF_TYPE_POSITION, CONF_MIN, 0, 0, NULL},
+    {"ss", &seek_to_sec, CONF_TYPE_TIME, 0, 0, 0, NULL},
 
-	// stop at given position
-	{"endpos", &end_at, CONF_TYPE_TIME_SIZE, 0, 0, 0, NULL},
+    // stop at given position
+    {"endpos", &end_at, CONF_TYPE_TIME_SIZE, 0, 0, 0, NULL},
 
-	{"edl", &edl_filename,  CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"edl", &edl_filename,  CONF_TYPE_STRING, 0, 0, 0, NULL},
 
-	// AVI specific: force non-interleaved mode
-	{"ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noni", &force_ni, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    // AVI specific: force non-interleaved mode
+    {"ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noni", &force_ni, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	// AVI and Ogg only: (re)build index at startup
-	{"noidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 0, NULL},
-	{"idx", &index_mode, CONF_TYPE_FLAG, 0, -1, 1, NULL},
-	{"forceidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 2, NULL},
-	{"saveidx", &index_file_save, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"loadidx", &index_file_load, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    // AVI and Ogg only: (re)build index at startup
+    {"noidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 0, NULL},
+    {"idx", &index_mode, CONF_TYPE_FLAG, 0, -1, 1, NULL},
+    {"forceidx", &index_mode, CONF_TYPE_FLAG, 0, -1, 2, NULL},
+    {"saveidx", &index_file_save, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"loadidx", &index_file_load, CONF_TYPE_STRING, 0, 0, 0, NULL},
 
-	// select audio/video/subtitle stream
-	{"aid", &audio_id, CONF_TYPE_INT, CONF_RANGE, -2, 8190, NULL},
-	{"ausid", &audio_substream_id, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"vid", &video_id, CONF_TYPE_INT, CONF_RANGE, -2, 8190, NULL},
-	{"sid", &dvdsub_id, CONF_TYPE_INT, CONF_RANGE, -2, 8190, NULL},
-	{"nosub", &dvdsub_id, CONF_TYPE_FLAG, 0, -1, -2, NULL},
-	{"novideo", &video_id, CONF_TYPE_FLAG, 0, -1, -2, NULL},
+    // select audio/video/subtitle stream
+    {"aid", &audio_id, CONF_TYPE_INT, CONF_RANGE, -2, 8190, NULL},
+    {"ausid", &audio_substream_id, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"vid", &video_id, CONF_TYPE_INT, CONF_RANGE, -2, 8190, NULL},
+    {"sid", &dvdsub_id, CONF_TYPE_INT, CONF_RANGE, -2, 8190, NULL},
+    {"nosub", &dvdsub_id, CONF_TYPE_FLAG, 0, -1, -2, NULL},
+    {"novideo", &video_id, CONF_TYPE_FLAG, 0, -1, -2, NULL},
 
-	{ "hr-mp3-seek", &hr_mp3_seek, CONF_TYPE_FLAG, 0, 0, 1, NULL },
-	{ "nohr-mp3-seek", &hr_mp3_seek, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    { "hr-mp3-seek", &hr_mp3_seek, CONF_TYPE_FLAG, 0, 0, 1, NULL },
+    { "nohr-mp3-seek", &hr_mp3_seek, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	{ "rawaudio", &demux_rawaudio_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
-	{ "rawvideo", &demux_rawvideo_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    { "rawaudio", &demux_rawaudio_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    { "rawvideo", &demux_rawvideo_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 
 #ifdef CONFIG_CDDA
-	{ "cdda", &cdda_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    { "cdda", &cdda_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
 
-	// demuxer.c - select audio/sub file/demuxer
-	{ "audiofile", &audio_stream, CONF_TYPE_STRING, 0, 0, 0, NULL },
-	{ "audiofile-cache", &audio_stream_cache, CONF_TYPE_INT, CONF_RANGE, 50, 65536, NULL},
-	{ "subfile", &sub_stream, CONF_TYPE_STRING, 0, 0, 0, NULL },
-	{ "demuxer", &demuxer_name, CONF_TYPE_STRING, 0, 0, 0, NULL },
-	{ "audio-demuxer", &audio_demuxer_name, CONF_TYPE_STRING, 0, 0, 0, NULL },
-	{ "sub-demuxer", &sub_demuxer_name, CONF_TYPE_STRING, 0, 0, 0, NULL },
-	{ "extbased", &extension_parsing, CONF_TYPE_FLAG, 0, 0, 1, NULL },
-	{ "noextbased", &extension_parsing, CONF_TYPE_FLAG, 0, 1, 0, NULL },
+    // demuxer.c - select audio/sub file/demuxer
+    { "audiofile", &audio_stream, CONF_TYPE_STRING, 0, 0, 0, NULL },
+    { "audiofile-cache", &audio_stream_cache, CONF_TYPE_INT, CONF_RANGE, 50, 65536, NULL},
+    { "subfile", &sub_stream, CONF_TYPE_STRING, 0, 0, 0, NULL },
+    { "demuxer", &demuxer_name, CONF_TYPE_STRING, 0, 0, 0, NULL },
+    { "audio-demuxer", &audio_demuxer_name, CONF_TYPE_STRING, 0, 0, 0, NULL },
+    { "sub-demuxer", &sub_demuxer_name, CONF_TYPE_STRING, 0, 0, 0, NULL },
+    { "extbased", &extension_parsing, CONF_TYPE_FLAG, 0, 0, 1, NULL },
+    { "noextbased", &extension_parsing, CONF_TYPE_FLAG, 0, 1, 0, NULL },
 
-        {"mf", mfopts_conf, CONF_TYPE_SUBCONFIG, 0,0,0, NULL},
+    {"mf", mfopts_conf, CONF_TYPE_SUBCONFIG, 0,0,0, NULL},
 #ifdef CONFIG_RADIO
-	{"radio", radioopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"radio", radioopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #else
-	{"radio", "MPlayer was compiled without Radio interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"radio", "MPlayer was compiled without Radio interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif /* CONFIG_RADIO */
 #ifdef CONFIG_TV
-	{"tv", tvopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"tv", tvopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #else
-	{"tv", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"tv", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif /* CONFIG_TV */
 #ifdef CONFIG_PVR
-	{"pvr", pvropts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"pvr", pvropts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #else
-	{"pvr", "MPlayer was compiled without V4L2/PVR interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"pvr", "MPlayer was compiled without V4L2/PVR interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif /* CONFIG_PVR */
-	{"vivo", vivoopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"vivo", vivoopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #ifdef CONFIG_DVBIN
-	{"dvbin", dvbin_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"dvbin", dvbin_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
 
 // ------------------------- a-v sync options --------------------
 
-	// AVI specific: A-V sync mode (bps vs. interleaving)
-	{"bps", &pts_from_bps, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nobps", &pts_from_bps, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    // AVI specific: A-V sync mode (bps vs. interleaving)
+    {"bps", &pts_from_bps, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nobps", &pts_from_bps, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	// set A-V sync correction speed (0=disables it):
-	{"mc", &default_max_pts_correction, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
+    // set A-V sync correction speed (0=disables it):
+    {"mc", &default_max_pts_correction, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
 
-	// force video/audio rate:
-	{"fps", &force_fps, CONF_TYPE_DOUBLE, CONF_MIN, 0, 0, NULL},
-	{"srate", &force_srate, CONF_TYPE_INT, CONF_RANGE, 1000, 8*48000, NULL},
-	{"channels", &audio_output_channels, CONF_TYPE_INT, CONF_RANGE, 1, 8, NULL},
-	{"format", &audio_output_format, CONF_TYPE_AFMT, 0, 0, 0, NULL},
-	{"speed", &playback_speed, CONF_TYPE_FLOAT, CONF_RANGE, 0.01, 100.0, NULL},
+    // force video/audio rate:
+    {"fps", &force_fps, CONF_TYPE_DOUBLE, CONF_MIN, 0, 0, NULL},
+    {"srate", &force_srate, CONF_TYPE_INT, CONF_RANGE, 1000, 8*48000, NULL},
+    {"channels", &audio_output_channels, CONF_TYPE_INT, CONF_RANGE, 1, 8, NULL},
+    {"format", &audio_output_format, CONF_TYPE_AFMT, 0, 0, 0, NULL},
+    {"speed", &playback_speed, CONF_TYPE_FLOAT, CONF_RANGE, 0.01, 100.0, NULL},
 
-	// set a-v distance
-	{"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -100.0, 100.0, NULL},
+    // set a-v distance
+    {"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -100.0, 100.0, NULL},
 
-	// ignore header-specified delay (dwStart)
-	{"ignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    // ignore header-specified delay (dwStart)
+    {"ignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
 #ifdef CONFIG_LIBA52
-        {"a52drc", &a52_drc_level, CONF_TYPE_FLOAT, CONF_RANGE, 0, 1, NULL},
+    {"a52drc", &a52_drc_level, CONF_TYPE_FLOAT, CONF_RANGE, 0, 1, NULL},
 #endif
 
 // ------------------------- codec/vfilter options --------------------
 
-	// MP3-only: select stereo/left/right
+    // MP3-only: select stereo/left/right
 #ifdef CONFIG_FAKE_MONO
-	{"stereo", &fakemono, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
+    {"stereo", &fakemono, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
 #endif
 
-	// disable audio
-	{"sound", &audio_id, CONF_TYPE_FLAG, 0, -2, -1, NULL},
-	{"nosound", &audio_id, CONF_TYPE_FLAG, 0, -1, -2, NULL},
+    // disable audio
+    {"sound", &audio_id, CONF_TYPE_FLAG, 0, -2, -1, NULL},
+    {"nosound", &audio_id, CONF_TYPE_FLAG, 0, -1, -2, NULL},
 
-	{"af*", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-	{"af-adv", audio_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"af*", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"af-adv", audio_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 
-	{"vop", "-vop has been removed, use -vf instead.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL},
-	{"vf*", &vf_settings, CONF_TYPE_OBJ_SETTINGS_LIST, 0, 0, 0, &vf_obj_list},
-	// select audio/video codec (by name) or codec family (by number):
-//	{"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 22, NULL}, // keep ranges in sync
-//	{"vfm", &video_family, CONF_TYPE_INT, CONF_MIN, 0, 29, NULL}, // with codec-cfg.c
-//	{"afm", &audio_fm, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"afm", &audio_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-	{"vfm", &video_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-//	{"ac", &audio_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-	{"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"vop", "-vop has been removed, use -vf instead.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL},
+    {"vf*", &vf_settings, CONF_TYPE_OBJ_SETTINGS_LIST, 0, 0, 0, &vf_obj_list},
+    // select audio/video codec (by name) or codec family (by number):
+//      {"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 22, NULL}, // keep ranges in sync
+//      {"vfm", &video_family, CONF_TYPE_INT, CONF_MIN, 0, 29, NULL}, // with codec-cfg.c
+//      {"afm", &audio_fm, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"afm", &audio_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"vfm", &video_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+//      {"ac", &audio_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 
-	// postprocessing:
+    // postprocessing:
 #ifdef CONFIG_LIBAVCODEC
-	{"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL},
 #endif
 #ifdef CONFIG_LIBPOSTPROC
-        {"pphelp", &pp_help, CONF_TYPE_PRINT_INDIRECT, CONF_NOCFG, 0, 0, NULL},
+    {"pphelp", &pp_help, CONF_TYPE_PRINT_INDIRECT, CONF_NOCFG, 0, 0, NULL},
 #endif
 
-	// scaling:
-	{"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, NULL},
-	{"ssf", scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
-        {"zoom", &softzoom, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-        {"nozoom", &softzoom, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"aspect", &movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0, NULL},
-	{"noaspect", &movie_aspect, CONF_TYPE_FLAG, 0, 0, 0, NULL},
-	{"xy", &screen_size_xy, CONF_TYPE_FLOAT, CONF_RANGE, 0.001, 4096, NULL},
+    // scaling:
+    {"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, NULL},
+    {"ssf", scaler_filter_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"zoom", &softzoom, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nozoom", &softzoom, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"aspect", &movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0, NULL},
+    {"noaspect", &movie_aspect, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+    {"xy", &screen_size_xy, CONF_TYPE_FLOAT, CONF_RANGE, 0.001, 4096, NULL},
 
-        {"flip", &flip, CONF_TYPE_FLAG, 0, -1, 1, NULL},
-        {"noflip", &flip, CONF_TYPE_FLAG, 0, -1, 0, NULL},
-	{"tsfastparse", "-tsfastparse is no longer a valid option.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL
+    {"flip", &flip, CONF_TYPE_FLAG, 0, -1, 1, NULL},
+    {"noflip", &flip, CONF_TYPE_FLAG, 0, -1, 0, NULL},
+    {"tsfastparse", "-tsfastparse is no longer a valid option.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL
 },
-	{"tsprog", &ts_prog, CONF_TYPE_INT, CONF_RANGE, 0, 65534, NULL},
+    {"tsprog", &ts_prog, CONF_TYPE_INT, CONF_RANGE, 0, 65534, NULL},
 #define TS_MAX_PROBE_SIZE 2000000 /* don't forget to change this in libmpdemux/demux_ts.c too */
-	{"tsprobe", &ts_probe, CONF_TYPE_POSITION, 0, 0, TS_MAX_PROBE_SIZE, NULL},
-	{"psprobe", &ps_probe, CONF_TYPE_POSITION, 0, 0, TS_MAX_PROBE_SIZE, NULL},
-	{"tskeepbroken", &ts_keep_broken, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"tsprobe", &ts_probe, CONF_TYPE_POSITION, 0, 0, TS_MAX_PROBE_SIZE, NULL},
+    {"psprobe", &ps_probe, CONF_TYPE_POSITION, 0, 0, TS_MAX_PROBE_SIZE, NULL},
+    {"tskeepbroken", &ts_keep_broken, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 
-	// draw by slices or whole frame (useful with libmpeg2/libavcodec)
-	{"slices", &vd_use_slices, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noslices", &vd_use_slices, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
+    // draw by slices or whole frame (useful with libmpeg2/libavcodec)
+    {"slices", &vd_use_slices, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noslices", &vd_use_slices, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
 
 #ifdef CONFIG_LIBAVCODEC
-	{"lavdopts", lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"lavdopts", lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
 #ifdef CONFIG_LIBAVFORMAT
-        {"lavfdopts",  lavfdopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"lavfdopts",  lavfdopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
 #ifdef CONFIG_XVID4
-	{"xvidopts", xvid_dec_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"xvidopts", xvid_dec_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
-	{"codecs-file", &codecs_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"codecs-file", &codecs_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
 // ------------------------- subtitles options --------------------
 
-	{"sub", &sub_name, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"sub", &sub_name, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 #ifdef CONFIG_FRIBIDI
-	{"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"flip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"noflip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"flip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"noflip-hebrew-commas", &fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #else
-	{"fribidi-charset", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"flip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"fribidi-charset", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"flip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_FRIBIDI */
 #ifdef CONFIG_ICONV
-	{"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
-	{"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
-	{"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
-	{"autosub", &sub_auto, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-        {"noautosub", &sub_auto, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"unicode", &sub_unicode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nounicode", &sub_unicode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noutf8", &sub_utf8, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"forcedsubsonly", &forced_subs_only, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	// specify IFO file for VOBSUB subtitle
-	{"ifo", &spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	// enable Closed Captioning display
-	{"subcc", &subcc_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nosubcc", &subcc_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"overlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 2, NULL},
-	{"nooverlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 0, NULL},
-	{"sub-bg-color", &sub_bg_color, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
-	{"sub-bg-alpha", &sub_bg_alpha, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
-	{"sub-no-text-pp", &sub_no_text_pp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"sub-fuzziness", &sub_match_fuzziness, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
-	{"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"subfont", &sub_font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
- 	{"subpos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
-	{"subalign", &sub_alignment, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
- 	{"subwidth", &sub_width_p, CONF_TYPE_INT, CONF_RANGE, 10, 100, NULL},
-	{"spualign", &spu_alignment, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},
-	{"spuaa", &spu_aamode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
-	{"spugauss", &spu_gaussvar, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 3.0, NULL},
+    {"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
+    {"subfps", &sub_fps, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
+    {"autosub", &sub_auto, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noautosub", &sub_auto, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"unicode", &sub_unicode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nounicode", &sub_unicode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"utf8", &sub_utf8, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noutf8", &sub_utf8, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"forcedsubsonly", &forced_subs_only, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    // specify IFO file for VOBSUB subtitle
+    {"ifo", &spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    // enable Closed Captioning display
+    {"subcc", &subcc_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nosubcc", &subcc_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"overlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 2, NULL},
+    {"nooverlapsub", &suboverlap_enabled, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+    {"sub-bg-color", &sub_bg_color, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
+    {"sub-bg-alpha", &sub_bg_alpha, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
+    {"sub-no-text-pp", &sub_no_text_pp, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"sub-fuzziness", &sub_match_fuzziness, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
+    {"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"subfont", &sub_font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
+    {"subpos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
+    {"subalign", &sub_alignment, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
+    {"subwidth", &sub_width_p, CONF_TYPE_INT, CONF_RANGE, 10, 100, NULL},
+    {"spualign", &spu_alignment, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},
+    {"spuaa", &spu_aamode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
+    {"spugauss", &spu_gaussvar, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 3.0, NULL},
 #ifdef CONFIG_FREETYPE
-	{"subfont-encoding", &subtitle_font_encoding, CONF_TYPE_STRING, 0, 0, 0, NULL},
- 	{"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
- 	{"subfont-osd-scale", &osd_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
- 	{"subfont-blur", &subtitle_font_radius, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
- 	{"subfont-outline", &subtitle_font_thickness, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
- 	{"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
+    {"subfont-encoding", &subtitle_font_encoding, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
+    {"subfont-osd-scale", &osd_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
+    {"subfont-blur", &subtitle_font_radius, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
+    {"subfont-outline", &subtitle_font_thickness, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
+    {"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
 #endif
 #ifdef CONFIG_ASS
-	{"ass", &ass_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noass", &ass_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"ass-font-scale", &ass_font_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
-	{"ass-line-spacing", &ass_line_spacing, CONF_TYPE_FLOAT, CONF_RANGE, -1000, 1000, NULL},
-	{"ass-top-margin", &ass_top_margin, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
-	{"ass-bottom-margin", &ass_bottom_margin, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
-	{"ass-use-margins", &ass_use_margins, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noass-use-margins", &ass_use_margins, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"embeddedfonts", &extract_embedded_fonts, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noembeddedfonts", &extract_embedded_fonts, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"ass-force-style", &ass_force_style_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-	{"ass-color", &ass_color, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"ass-border-color", &ass_border_color, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"ass-styles", &ass_styles_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"ass-hinting", &ass_hinting, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL},
+    {"ass", &ass_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noass", &ass_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"ass-font-scale", &ass_font_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
+    {"ass-line-spacing", &ass_line_spacing, CONF_TYPE_FLOAT, CONF_RANGE, -1000, 1000, NULL},
+    {"ass-top-margin", &ass_top_margin, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+    {"ass-bottom-margin", &ass_bottom_margin, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL},
+    {"ass-use-margins", &ass_use_margins, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noass-use-margins", &ass_use_margins, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"embeddedfonts", &extract_embedded_fonts, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noembeddedfonts", &extract_embedded_fonts, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"ass-force-style", &ass_force_style_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"ass-color", &ass_color, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"ass-border-color", &ass_border_color, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"ass-styles", &ass_styles_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"ass-hinting", &ass_hinting, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL},
 #endif
 #ifdef CONFIG_FONTCONFIG
-	{"fontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, -1, 1, NULL},
-	{"nofontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, 1, -1, NULL},
+    {"fontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, -1, 1, NULL},
+    {"nofontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, 1, -1, NULL},
 #else
-	{"fontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"nofontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"fontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"nofontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_FONTCONFIG */
 
 #endif /* MPLAYER_CFG_COMMON_OPTS_H */

Modified: trunk/cfg-common.h
==============================================================================
--- trunk/cfg-common.h	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/cfg-common.h	Tue May  4 01:34:38 2010	(r31134)
@@ -92,67 +92,67 @@ const m_option_t radioopts_conf[]={
 
 #ifdef CONFIG_TV
 const m_option_t tvopts_conf[]={
-	{"on", "-tv on has been removed, use tv:// instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"immediatemode", &stream_tv_defaults.immediate, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL},
-	{"noaudio", &stream_tv_defaults.noaudio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"audiorate", &stream_tv_defaults.audiorate, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"driver", &stream_tv_defaults.driver, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"device", &stream_tv_defaults.device, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"freq", &stream_tv_defaults.freq, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"channel", &stream_tv_defaults.channel, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"chanlist", &stream_tv_defaults.chanlist, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"norm", &stream_tv_defaults.norm, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"automute", &stream_tv_defaults.automute, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
+    {"on", "-tv on has been removed, use tv:// instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"immediatemode", &stream_tv_defaults.immediate, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL},
+    {"noaudio", &stream_tv_defaults.noaudio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"audiorate", &stream_tv_defaults.audiorate, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"driver", &stream_tv_defaults.driver, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"device", &stream_tv_defaults.device, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"freq", &stream_tv_defaults.freq, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"channel", &stream_tv_defaults.channel, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"chanlist", &stream_tv_defaults.chanlist, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"norm", &stream_tv_defaults.norm, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"automute", &stream_tv_defaults.automute, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL},
 #if defined(CONFIG_TV_V4L2) || defined(CONFIG_TV_DSHOW)
-	{"normid", &stream_tv_defaults.normid, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"normid", &stream_tv_defaults.normid, CONF_TYPE_INT, 0, 0, 0, NULL},
 #endif
-	{"width", &stream_tv_defaults.width, CONF_TYPE_INT, 0, 0, 4096, NULL},
-	{"height", &stream_tv_defaults.height, CONF_TYPE_INT, 0, 0, 4096, NULL},
-	{"input", &stream_tv_defaults.input, CONF_TYPE_INT, 0, 0, 20, NULL},
-	{"outfmt", &stream_tv_defaults.outfmt, CONF_TYPE_IMGFMT, 0, 0, 0, NULL},
-	{"fps", &stream_tv_defaults.fps, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
-	{"channels", &stream_tv_defaults.channels, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-	{"brightness", &stream_tv_defaults.brightness, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
-	{"contrast", &stream_tv_defaults.contrast, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
-	{"hue", &stream_tv_defaults.hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
-	{"saturation", &stream_tv_defaults.saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
-	{"gain", &stream_tv_defaults.gain, CONF_TYPE_INT, CONF_RANGE, -1, 100, NULL},
+    {"width", &stream_tv_defaults.width, CONF_TYPE_INT, 0, 0, 4096, NULL},
+    {"height", &stream_tv_defaults.height, CONF_TYPE_INT, 0, 0, 4096, NULL},
+    {"input", &stream_tv_defaults.input, CONF_TYPE_INT, 0, 0, 20, NULL},
+    {"outfmt", &stream_tv_defaults.outfmt, CONF_TYPE_IMGFMT, 0, 0, 0, NULL},
+    {"fps", &stream_tv_defaults.fps, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
+    {"channels", &stream_tv_defaults.channels, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"brightness", &stream_tv_defaults.brightness, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+    {"contrast", &stream_tv_defaults.contrast, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+    {"hue", &stream_tv_defaults.hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+    {"saturation", &stream_tv_defaults.saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+    {"gain", &stream_tv_defaults.gain, CONF_TYPE_INT, CONF_RANGE, -1, 100, NULL},
 #if defined(CONFIG_TV_V4L) || defined(CONFIG_TV_V4L2) || defined(CONFIG_TV_DSHOW)
-	{"buffersize", &stream_tv_defaults.buffer_size, CONF_TYPE_INT, CONF_RANGE, 16, 1024, NULL},
-	{"amode", &stream_tv_defaults.amode, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
-	{"volume", &stream_tv_defaults.volume, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
+    {"buffersize", &stream_tv_defaults.buffer_size, CONF_TYPE_INT, CONF_RANGE, 16, 1024, NULL},
+    {"amode", &stream_tv_defaults.amode, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
+    {"volume", &stream_tv_defaults.volume, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
 #endif
 #if defined(CONFIG_TV_V4L) || defined(CONFIG_TV_V4L2)
-	{"bass", &stream_tv_defaults.bass, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
-	{"treble", &stream_tv_defaults.treble, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
-	{"balance", &stream_tv_defaults.balance, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
-	{"forcechan", &stream_tv_defaults.forcechan, CONF_TYPE_INT, CONF_RANGE, 1, 2, NULL},
-	{"forceaudio", &stream_tv_defaults.force_audio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"buffersize", &stream_tv_defaults.buffer_size, CONF_TYPE_INT, CONF_RANGE, 16, 1024, NULL},
-	{"mjpeg", &stream_tv_defaults.mjpeg, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"decimation", &stream_tv_defaults.decimation, CONF_TYPE_INT, CONF_RANGE, 1, 4, NULL},
-	{"quality", &stream_tv_defaults.quality, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
+    {"bass", &stream_tv_defaults.bass, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
+    {"treble", &stream_tv_defaults.treble, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
+    {"balance", &stream_tv_defaults.balance, CONF_TYPE_INT, CONF_RANGE, 0, 65535, NULL},
+    {"forcechan", &stream_tv_defaults.forcechan, CONF_TYPE_INT, CONF_RANGE, 1, 2, NULL},
+    {"forceaudio", &stream_tv_defaults.force_audio, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"buffersize", &stream_tv_defaults.buffer_size, CONF_TYPE_INT, CONF_RANGE, 16, 1024, NULL},
+    {"mjpeg", &stream_tv_defaults.mjpeg, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"decimation", &stream_tv_defaults.decimation, CONF_TYPE_INT, CONF_RANGE, 1, 4, NULL},
+    {"quality", &stream_tv_defaults.quality, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
 #ifdef CONFIG_ALSA
-	{"alsa", &stream_tv_defaults.alsa, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"alsa", &stream_tv_defaults.alsa, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #endif /* CONFIG_ALSA */
 #endif /* defined(CONFIG_TV_V4L) || defined(CONFIG_TV_V4L2) */
-	{"adevice", &stream_tv_defaults.adevice, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"tdevice", &stream_tv_defaults.teletext.device, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"tpage", &stream_tv_defaults.teletext.page, CONF_TYPE_INT, CONF_RANGE, 100, 899, NULL},
-	{"tformat", &stream_tv_defaults.teletext.format, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
-	{"tlang", &stream_tv_defaults.teletext.lang, CONF_TYPE_INT, CONF_RANGE, -1, 0x7f, NULL},
-	{"audioid", &stream_tv_defaults.audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
+    {"adevice", &stream_tv_defaults.adevice, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"tdevice", &stream_tv_defaults.teletext.device, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"tpage", &stream_tv_defaults.teletext.page, CONF_TYPE_INT, CONF_RANGE, 100, 899, NULL},
+    {"tformat", &stream_tv_defaults.teletext.format, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
+    {"tlang", &stream_tv_defaults.teletext.lang, CONF_TYPE_INT, CONF_RANGE, -1, 0x7f, NULL},
+    {"audioid", &stream_tv_defaults.audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 9, NULL},
 #ifdef CONFIG_TV_DSHOW
-	{"hidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nohidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 0, NULL},
-	{"hidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nohidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 0, NULL},
-	{"system_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nosystem_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 0, NULL},
-	{"normalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nonormalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+    {"hidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nohidden_video_renderer", &stream_tv_defaults.hidden_video_renderer, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+    {"hidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nohidden_vp_renderer", &stream_tv_defaults.hidden_vp_renderer, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+    {"system_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nosystem_clock", &stream_tv_defaults.system_clock, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+    {"normalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nonormalize_audio_chunks", &stream_tv_defaults.normalize_audio_chunks, CONF_TYPE_FLAG, 0, 0, 0, NULL},
 #endif
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 #endif /* CONFIG_TV */
 
@@ -168,16 +168,16 @@ extern char *pvr_param_stream_type;
 
 #ifdef CONFIG_PVR
 const m_option_t pvropts_conf[]={
-	{"aspect", &pvr_param_aspect_ratio, CONF_TYPE_INT, 0, 1, 4, NULL},
-	{"arate", &pvr_param_sample_rate, CONF_TYPE_INT, 0, 32000, 48000, NULL},
-	{"alayer", &pvr_param_audio_layer, CONF_TYPE_INT, 0, 1, 2, NULL},
-	{"abitrate", &pvr_param_audio_bitrate, CONF_TYPE_INT, 0, 32, 448, NULL},
-	{"amode", &pvr_param_audio_mode, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"vbitrate", &pvr_param_bitrate, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"vmode", &pvr_param_bitrate_mode, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"vpeak", &pvr_param_bitrate_peak, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"fmt", &pvr_param_stream_type, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {"aspect", &pvr_param_aspect_ratio, CONF_TYPE_INT, 0, 1, 4, NULL},
+    {"arate", &pvr_param_sample_rate, CONF_TYPE_INT, 0, 32000, 48000, NULL},
+    {"alayer", &pvr_param_audio_layer, CONF_TYPE_INT, 0, 1, 2, NULL},
+    {"abitrate", &pvr_param_audio_bitrate, CONF_TYPE_INT, 0, 32, 448, NULL},
+    {"amode", &pvr_param_audio_mode, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"vbitrate", &pvr_param_bitrate, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"vmode", &pvr_param_bitrate_mode, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"vpeak", &pvr_param_bitrate_peak, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"fmt", &pvr_param_stream_type, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 #endif /* CONFIG_PVR */
 
@@ -201,13 +201,13 @@ extern float sws_chr_sharpen;
 extern float sws_lum_sharpen;
 
 const m_option_t scaler_filter_conf[]={
-	{"lgb", &sws_lum_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
-	{"cgb", &sws_chr_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
-	{"cvs", &sws_chr_vshift, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"chs", &sws_chr_hshift, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"ls", &sws_lum_sharpen, CONF_TYPE_FLOAT, 0, -100.0, 100.0, NULL},
-	{"cs", &sws_chr_sharpen, CONF_TYPE_FLOAT, 0, -100.0, 100.0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {"lgb", &sws_lum_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
+    {"cgb", &sws_chr_gblur, CONF_TYPE_FLOAT, 0, 0, 100.0, NULL},
+    {"cvs", &sws_chr_vshift, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"chs", &sws_chr_hshift, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"ls", &sws_lum_sharpen, CONF_TYPE_FLOAT, 0, -100.0, 100.0, NULL},
+    {"cs", &sws_chr_sharpen, CONF_TYPE_FLOAT, 0, -100.0, 100.0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 /* VIVO demuxer options: */
@@ -222,17 +222,17 @@ extern int vivo_param_vformat;
 extern char *dvd_device, *cdrom_device;
 
 const m_option_t vivoopts_conf[]={
-	{"version", &vivo_param_version, CONF_TYPE_INT, 0, 0, 0, NULL},
-	/* audio options */
-	{"acodec", &vivo_param_acodec, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"abitrate", &vivo_param_abitrate, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"samplerate", &vivo_param_samplerate, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"bytesperblock", &vivo_param_bytesperblock, CONF_TYPE_INT, 0, 0, 0, NULL},
-	/* video options */
-	{"width", &vivo_param_width, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"height", &vivo_param_height, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"vformat", &vivo_param_vformat, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {"version", &vivo_param_version, CONF_TYPE_INT, 0, 0, 0, NULL},
+    /* audio options */
+    {"acodec", &vivo_param_acodec, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"abitrate", &vivo_param_abitrate, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"samplerate", &vivo_param_samplerate, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"bytesperblock", &vivo_param_bytesperblock, CONF_TYPE_INT, 0, 0, 0, NULL},
+    /* video options */
+    {"width", &vivo_param_width, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"height", &vivo_param_height, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"vformat", &vivo_param_vformat, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 extern int    mf_w;
@@ -243,120 +243,120 @@ extern m_obj_settings_t* vf_settings;
 extern m_obj_list_t vf_obj_list;
 
 const m_option_t mfopts_conf[]={
-        {"on", "-mf on has been removed, use mf:// instead.\n", CONF_TYPE_PRINT, 0, 0, 1, NULL},
-        {"w", &mf_w, CONF_TYPE_INT, 0, 0, 0, NULL},
-        {"h", &mf_h, CONF_TYPE_INT, 0, 0, 0, NULL},
-        {"fps", &mf_fps, CONF_TYPE_DOUBLE, 0, 0, 0, NULL},
-        {"type", &mf_type, CONF_TYPE_STRING, 0, 0, 0, NULL},
-        {NULL, NULL, 0, 0, 0, 0, NULL}
+    {"on", "-mf on has been removed, use mf:// instead.\n", CONF_TYPE_PRINT, 0, 0, 1, NULL},
+    {"w", &mf_w, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"h", &mf_h, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"fps", &mf_fps, CONF_TYPE_DOUBLE, 0, 0, 0, NULL},
+    {"type", &mf_type, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 #include "libaf/af.h"
 extern af_cfg_t af_cfg; // Audio filter configuration, defined in libmpcodecs/dec_audio.c
 const m_option_t audio_filter_conf[]={
-	{"list", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-        {"force", &af_cfg.force, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {"list", &af_cfg.list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"force", &af_cfg.force, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 extern int mp_msg_levels[MSGT_MAX];
 extern int mp_msg_level_all;
 
 const m_option_t msgl_config[]={
-	{ "all", &mp_msg_level_all, CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL},
+    { "all", &mp_msg_level_all, CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL},
 
-	{ "global", &mp_msg_levels[MSGT_GLOBAL], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "cplayer", &mp_msg_levels[MSGT_CPLAYER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "gplayer", &mp_msg_levels[MSGT_GPLAYER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "vo", &mp_msg_levels[MSGT_VO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "ao", &mp_msg_levels[MSGT_AO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "demuxer", &mp_msg_levels[MSGT_DEMUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "ds", &mp_msg_levels[MSGT_DS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "demux", &mp_msg_levels[MSGT_DEMUX], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "header", &mp_msg_levels[MSGT_HEADER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "avsync", &mp_msg_levels[MSGT_AVSYNC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "autoq", &mp_msg_levels[MSGT_AUTOQ], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "cfgparser", &mp_msg_levels[MSGT_CFGPARSER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "decaudio", &mp_msg_levels[MSGT_DECAUDIO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "decvideo", &mp_msg_levels[MSGT_DECVIDEO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "seek", &mp_msg_levels[MSGT_SEEK], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "win32", &mp_msg_levels[MSGT_WIN32], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "open", &mp_msg_levels[MSGT_OPEN], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "dvd", &mp_msg_levels[MSGT_DVD], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "parsees", &mp_msg_levels[MSGT_PARSEES], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "lirc", &mp_msg_levels[MSGT_LIRC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "stream", &mp_msg_levels[MSGT_STREAM], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "cache", &mp_msg_levels[MSGT_CACHE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "mencoder", &mp_msg_levels[MSGT_MENCODER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "xacodec", &mp_msg_levels[MSGT_XACODEC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "tv", &mp_msg_levels[MSGT_TV], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "radio", &mp_msg_levels[MSGT_RADIO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "osdep", &mp_msg_levels[MSGT_OSDEP], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "spudec", &mp_msg_levels[MSGT_SPUDEC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "playtree", &mp_msg_levels[MSGT_PLAYTREE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "input", &mp_msg_levels[MSGT_INPUT], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "vfilter", &mp_msg_levels[MSGT_VFILTER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "osd", &mp_msg_levels[MSGT_OSD], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "network", &mp_msg_levels[MSGT_NETWORK], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "cpudetect", &mp_msg_levels[MSGT_CPUDETECT], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "codeccfg", &mp_msg_levels[MSGT_CODECCFG], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "sws", &mp_msg_levels[MSGT_SWS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "vobsub", &mp_msg_levels[MSGT_VOBSUB], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "subreader", &mp_msg_levels[MSGT_SUBREADER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "afilter", &mp_msg_levels[MSGT_AFILTER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "netst", &mp_msg_levels[MSGT_NETST], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "muxer", &mp_msg_levels[MSGT_MUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "osd-menu", &mp_msg_levels[MSGT_OSD_MENU], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "ass", &mp_msg_levels[MSGT_ASS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-	{ "statusline", &mp_msg_levels[MSGT_STATUSLINE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
-        {"help", "Available msg modules:\n"
-        "   global     - common player errors/information\n"
-        "   cplayer    - console player (mplayer.c)\n"
-        "   gplayer    - gui player\n"
-        "   vo         - libvo\n"
-        "   ao         - libao\n"
-        "   demuxer    - demuxer.c (general stuff)\n"
-        "   ds         - demux stream (add/read packet etc)\n"
-        "   demux      - fileformat-specific stuff (demux_*.c)\n"
-        "   header     - fileformat-specific header (*header.c)\n"
-        "   avsync     - mplayer.c timer stuff\n"
-        "   autoq      - mplayer.c auto-quality stuff\n"
-        "   cfgparser  - cfgparser.c\n"
-        "   decaudio   - av decoder\n"
-        "   decvideo\n"
-        "   seek       - seeking code\n"
-        "   win32      - win32 dll stuff\n"
-        "   open       - open.c (stream opening)\n"
-        "   dvd        - open.c (DVD init/read/seek)\n"
-        "   parsees    - parse_es.c (mpeg stream parser)\n"
-        "   lirc       - lirc_mp.c and input lirc driver\n"
-        "   stream     - stream.c\n"
-        "   cache      - cache2.c\n"
-        "   mencoder\n"
-        "   xacodec    - XAnim codecs\n"
-        "   tv         - TV input subsystem\n"
-        "   osdep      - OS-dependent parts\n"
-        "   spudec     - spudec.c\n"
-        "   playtree   - Playtree handling (playtree.c, playtreeparser.c)\n"
-        "   input\n"
-        "   vfilter\n"
-        "   osd\n"
-        "   network\n"
-        "   cpudetect\n"
-        "   codeccfg\n"
-        "   sws\n"
-        "   vobsub\n"
-        "   subreader\n"
-        "   osd-menu   - OSD menu messages\n"
-        "   afilter    - Audio filter messages\n"
-        "   netst      - Netstream\n"
-        "   muxer      - muxer layer\n"
-        "   identify   - identify output\n"
-        "   ass        - libass messages\n"
-        "   statusline - playback/encoding status line\n"
-        "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-      	{NULL, NULL, 0, 0, 0, 0, NULL}
+    { "global", &mp_msg_levels[MSGT_GLOBAL], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "cplayer", &mp_msg_levels[MSGT_CPLAYER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "gplayer", &mp_msg_levels[MSGT_GPLAYER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "vo", &mp_msg_levels[MSGT_VO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "ao", &mp_msg_levels[MSGT_AO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "demuxer", &mp_msg_levels[MSGT_DEMUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "ds", &mp_msg_levels[MSGT_DS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "demux", &mp_msg_levels[MSGT_DEMUX], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "header", &mp_msg_levels[MSGT_HEADER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "avsync", &mp_msg_levels[MSGT_AVSYNC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "autoq", &mp_msg_levels[MSGT_AUTOQ], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "cfgparser", &mp_msg_levels[MSGT_CFGPARSER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "decaudio", &mp_msg_levels[MSGT_DECAUDIO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "decvideo", &mp_msg_levels[MSGT_DECVIDEO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "seek", &mp_msg_levels[MSGT_SEEK], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "win32", &mp_msg_levels[MSGT_WIN32], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "open", &mp_msg_levels[MSGT_OPEN], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "dvd", &mp_msg_levels[MSGT_DVD], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "parsees", &mp_msg_levels[MSGT_PARSEES], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "lirc", &mp_msg_levels[MSGT_LIRC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "stream", &mp_msg_levels[MSGT_STREAM], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "cache", &mp_msg_levels[MSGT_CACHE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "mencoder", &mp_msg_levels[MSGT_MENCODER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "xacodec", &mp_msg_levels[MSGT_XACODEC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "tv", &mp_msg_levels[MSGT_TV], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "radio", &mp_msg_levels[MSGT_RADIO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "osdep", &mp_msg_levels[MSGT_OSDEP], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "spudec", &mp_msg_levels[MSGT_SPUDEC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "playtree", &mp_msg_levels[MSGT_PLAYTREE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "input", &mp_msg_levels[MSGT_INPUT], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "vfilter", &mp_msg_levels[MSGT_VFILTER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "osd", &mp_msg_levels[MSGT_OSD], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "network", &mp_msg_levels[MSGT_NETWORK], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "cpudetect", &mp_msg_levels[MSGT_CPUDETECT], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "codeccfg", &mp_msg_levels[MSGT_CODECCFG], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "sws", &mp_msg_levels[MSGT_SWS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "vobsub", &mp_msg_levels[MSGT_VOBSUB], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "subreader", &mp_msg_levels[MSGT_SUBREADER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "afilter", &mp_msg_levels[MSGT_AFILTER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "netst", &mp_msg_levels[MSGT_NETST], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "muxer", &mp_msg_levels[MSGT_MUXER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "osd-menu", &mp_msg_levels[MSGT_OSD_MENU], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "ass", &mp_msg_levels[MSGT_ASS], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    { "statusline", &mp_msg_levels[MSGT_STATUSLINE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
+    {"help", "Available msg modules:\n"
+    "   global     - common player errors/information\n"
+    "   cplayer    - console player (mplayer.c)\n"
+    "   gplayer    - gui player\n"
+    "   vo     - libvo\n"
+    "   ao     - libao\n"
+    "   demuxer    - demuxer.c (general stuff)\n"
+    "   ds     - demux stream (add/read packet etc)\n"
+    "   demux      - fileformat-specific stuff (demux_*.c)\n"
+    "   header     - fileformat-specific header (*header.c)\n"
+    "   avsync     - mplayer.c timer stuff\n"
+    "   autoq      - mplayer.c auto-quality stuff\n"
+    "   cfgparser  - cfgparser.c\n"
+    "   decaudio   - av decoder\n"
+    "   decvideo\n"
+    "   seek       - seeking code\n"
+    "   win32      - win32 dll stuff\n"
+    "   open       - open.c (stream opening)\n"
+    "   dvd    - open.c (DVD init/read/seek)\n"
+    "   parsees    - parse_es.c (mpeg stream parser)\n"
+    "   lirc       - lirc_mp.c and input lirc driver\n"
+    "   stream     - stream.c\n"
+    "   cache      - cache2.c\n"
+    "   mencoder\n"
+    "   xacodec    - XAnim codecs\n"
+    "   tv     - TV input subsystem\n"
+    "   osdep      - OS-dependent parts\n"
+    "   spudec     - spudec.c\n"
+    "   playtree   - Playtree handling (playtree.c, playtreeparser.c)\n"
+    "   input\n"
+    "   vfilter\n"
+    "   osd\n"
+    "   network\n"
+    "   cpudetect\n"
+    "   codeccfg\n"
+    "   sws\n"
+    "   vobsub\n"
+    "   subreader\n"
+    "   osd-menu   - OSD menu messages\n"
+    "   afilter    - Audio filter messages\n"
+    "   netst      - Netstream\n"
+    "   muxer      - muxer layer\n"
+    "   identify   - identify output\n"
+    "   ass    - libass messages\n"
+    "   statusline - playback/encoding status line\n"
+    "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 
 };
 

Modified: trunk/cfg-mencoder.h
==============================================================================
--- trunk/cfg-mencoder.h	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/cfg-mencoder.h	Tue May  4 01:34:38 2010	(r31134)
@@ -41,243 +41,243 @@ extern const m_option_t vfwopts_conf[];
 extern const m_option_t xvidencopts_conf[];
 
 const m_option_t ovc_conf[]={
-	{"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL},
-	{"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL},
-	{"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL},
-//	{"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
-	{"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL},
-	{"vfw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_VFW, NULL},
-	{"libdv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBDV, NULL},
-	{"xvid", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_XVID, NULL},
-	{"qtvideo", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_QTVIDEO, NULL},
-	{"nuv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NUV, NULL},
-	{"x264", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_X264, NULL},
-	{"help", "\nAvailable codecs:\n"
-	"   copy     - frame copy, without re-encoding. Doesn't work with filters.\n"
-	"   frameno  - special audio-only file for 3-pass encoding, see DOCS.\n"
-	"   raw      - uncompressed video. Use fourcc option to set format explicitly.\n"
+    {"copy", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_COPY, NULL},
+    {"frameno", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_FRAMENO, NULL},
+    {"lavc", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBAVCODEC, NULL},
+//    {"null", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NULL, NULL},
+    {"raw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_RAW, NULL},
+    {"vfw", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_VFW, NULL},
+    {"libdv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_LIBDV, NULL},
+    {"xvid", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_XVID, NULL},
+    {"qtvideo", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_QTVIDEO, NULL},
+    {"nuv", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_NUV, NULL},
+    {"x264", &out_video_codec, CONF_TYPE_FLAG, 0, 0, VCODEC_X264, NULL},
+    {"help", "\nAvailable codecs:\n"
+    "   copy     - frame copy, without re-encoding. Doesn't work with filters.\n"
+    "   frameno  - special audio-only file for 3-pass encoding, see DOCS.\n"
+    "   raw      - uncompressed video. Use fourcc option to set format explicitly.\n"
 #ifdef CONFIG_LIBLZO
-	"   nuv      - nuppel video\n"
+    "   nuv      - nuppel video\n"
 #endif
 #ifdef CONFIG_LIBAVCODEC
-	"   lavc     - libavcodec codecs - best quality!\n"
+    "   lavc     - libavcodec codecs - best quality!\n"
 #endif
 #ifdef CONFIG_WIN32DLL
-	"   vfw      - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n"
-	"   qtvideo  - QuickTime DLLs, currently only SVQ1/3 are supported.\n"
+    "   vfw      - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n"
+    "   qtvideo  - QuickTime DLLs, currently only SVQ1/3 are supported.\n"
 #endif
 #ifdef CONFIG_LIBDV095
-	"   libdv    - DV encoding with libdv v0.9.5\n"
+    "   libdv    - DV encoding with libdv v0.9.5\n"
 #endif
 #ifdef CONFIG_XVID4
-	"   xvid     - XviD encoding\n"
+    "   xvid     - XviD encoding\n"
 #endif
 #ifdef CONFIG_X264
-	"   x264     - H.264 encoding\n"
+    "   x264     - H.264 encoding\n"
 #endif
-	"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 const m_option_t oac_conf[]={
-	{"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL},
-	{"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL},
+    {"copy", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_COPY, NULL},
+    {"pcm", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_PCM, NULL},
 #ifdef CONFIG_MP3LAME
-	{"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL},
+    {"mp3lame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_VBRMP3, NULL},
 #else
-	{"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_MP3LAME */
 #ifdef CONFIG_LIBAVCODEC
-	{"lavc", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_LAVC, NULL},
+    {"lavc", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_LAVC, NULL},
 #else
-	{"lavc", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"lavc", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_LIBAVCODEC */
 #ifdef CONFIG_TOOLAME
-	{"toolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TOOLAME, NULL},
+    {"toolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TOOLAME, NULL},
 #else
-	{"toolame", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"toolame", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_TOOLAME */
 #ifdef CONFIG_TWOLAME
-	{"twolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TWOLAME, NULL},
+    {"twolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TWOLAME, NULL},
 #else
-	{"twolame", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"twolame", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_TWOLAME */
 #ifdef CONFIG_FAAC
-	{"faac", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_FAAC, NULL},
+    {"faac", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_FAAC, NULL},
 #else
-	{"faac", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"faac", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_FAAC */
-	{"help", "\nAvailable codecs:\n"
-	"   copy     - frame copy, without re-encoding (useful for AC3)\n"
-	"   pcm      - uncompressed PCM audio\n"
+    {"help", "\nAvailable codecs:\n"
+    "   copy     - frame copy, without re-encoding (useful for AC3)\n"
+    "   pcm      - uncompressed PCM audio\n"
 #ifdef CONFIG_MP3LAME
-	"   mp3lame  - cbr/abr/vbr MP3 using libmp3lame\n"
+    "   mp3lame  - cbr/abr/vbr MP3 using libmp3lame\n"
 #endif
 #ifdef CONFIG_LIBAVCODEC
-	"   lavc     - FFmpeg audio encoder (MP2, AC3, ...)\n"
+    "   lavc     - FFmpeg audio encoder (MP2, AC3, ...)\n"
 #endif
 #ifdef CONFIG_TOOLAME
-	"   toolame  - Toolame MP2 audio encoder\n"
+    "   toolame  - Toolame MP2 audio encoder\n"
 #endif
 #ifdef CONFIG_TWOLAME
-	"   twolame  - Twolame MP2 audio encoder\n"
+    "   twolame  - Twolame MP2 audio encoder\n"
 #endif
 #ifdef CONFIG_FAAC
-	"   faac     - FAAC AAC audio encoder\n"
+    "   faac     - FAAC AAC audio encoder\n"
 #endif
-	"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 const m_option_t info_conf[]={
-	{"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"subject", &info_subject, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"copyright", &info_copyright, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"srcform", &info_sourceform, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"comment", &info_comment, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"help", "\nAvailable INFO fields:\n"
-	"   name      - title of the work\n"
-	"   artist    - artist or author of the work\n"
-	"   genre     - original work category\n"
-	"   subject   - contents of the work\n"
-	"   copyright - copyright information\n"
-	"   srcform   - original format of the digitzed material\n"
-	"   comment   - general comments about the work\n"
-	"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {"name", &info_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"artist", &info_artist, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"genre", &info_genre, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"subject", &info_subject, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"copyright", &info_copyright, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"srcform", &info_sourceform, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"comment", &info_comment, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"help", "\nAvailable INFO fields:\n"
+    "   name      - title of the work\n"
+    "   artist    - artist or author of the work\n"
+    "   genre     - original work category\n"
+    "   subject   - contents of the work\n"
+    "   copyright - copyright information\n"
+    "   srcform   - original format of the digitzed material\n"
+    "   comment   - general comments about the work\n"
+    "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 const m_option_t of_conf[]={
-	{"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL},
-	{"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL},
+    {"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL},
+    {"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL},
 #ifdef CONFIG_LIBAVFORMAT
-	{"lavf", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_LAVF, NULL},
+    {"lavf", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_LAVF, NULL},
 #endif
-	{"rawvideo", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWVIDEO, NULL},
-	{"rawaudio", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWAUDIO, NULL},
-	{"help", "\nAvailable output formats:\n"
-	"   avi      - Microsoft Audio/Video Interleaved\n"
-	"   mpeg     - MPEG-1/2 system stream format\n"
+    {"rawvideo", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWVIDEO, NULL},
+    {"rawaudio", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWAUDIO, NULL},
+    {"help", "\nAvailable output formats:\n"
+    "   avi      - Microsoft Audio/Video Interleaved\n"
+    "   mpeg     - MPEG-1/2 system stream format\n"
 #ifdef CONFIG_LIBAVFORMAT
-	"   lavf     - FFmpeg libavformat muxers\n"
+    "   lavf     - FFmpeg libavformat muxers\n"
 #endif
-	"   rawvideo - (video only, one stream only) raw stream, no muxing\n"
-	"   rawaudio - (audio only, one stream only) raw stream, no muxing\n"
-	"\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    "   rawvideo - (video only, one stream only) raw stream, no muxing\n"
+    "   rawaudio - (audio only, one stream only) raw stream, no muxing\n"
+    "\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 extern float avi_aspect_override; /* defined in libmpdemux/muxer_avi.c */
 extern int write_odml; /* defined in libmpdemux/muxer_avi.c */
 
 const m_option_t mencoder_opts[]={
-	/* name, pointer, type, flags, min, max */
+    /* name, pointer, type, flags, min, max */
 
-	{"frameno-file", &frameno_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"frameno-file", &frameno_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 
-        {"hr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-        {"nohr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"hr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nohr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	// set output framerate - recommended for variable-FPS (ASF etc) files
-	// and for 29.97FPS progressive MPEG2 streams
-	{"ofps", &force_ofps, CONF_TYPE_DOUBLE, CONF_MIN|CONF_GLOBAL, 0, 0, NULL},
-	{"o", &out_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    // set output framerate - recommended for variable-FPS (ASF etc) files
+    // and for 29.97FPS progressive MPEG2 streams
+    {"ofps", &force_ofps, CONF_TYPE_DOUBLE, CONF_MIN|CONF_GLOBAL, 0, 0, NULL},
+    {"o", &out_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 
-	// limit number of skippable frames after a non-skipped one
-	{"skiplimit", &skip_limit, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"noskiplimit", &skip_limit, CONF_TYPE_FLAG, 0, 0, -1, NULL},
-	{"noskip", &skip_limit, CONF_TYPE_FLAG, 0, 0, 0, NULL},
+    // limit number of skippable frames after a non-skipped one
+    {"skiplimit", &skip_limit, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"noskiplimit", &skip_limit, CONF_TYPE_FLAG, 0, 0, -1, NULL},
+    {"noskip", &skip_limit, CONF_TYPE_FLAG, 0, 0, 0, NULL},
 
-	{"audio-density", &audio_density, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 1, 50, NULL},
-	{"audio-preload", &audio_preload, CONF_TYPE_FLOAT, CONF_RANGE|CONF_GLOBAL, 0, 2, NULL},
-	{"audio-delay",   &audio_delay_fix, CONF_TYPE_FLOAT, CONF_GLOBAL, 0, 0, NULL},
+    {"audio-density", &audio_density, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 1, 50, NULL},
+    {"audio-preload", &audio_preload, CONF_TYPE_FLOAT, CONF_RANGE|CONF_GLOBAL, 0, 2, NULL},
+    {"audio-delay",   &audio_delay_fix, CONF_TYPE_FLOAT, CONF_GLOBAL, 0, 0, NULL},
 
-	{"x", "-x has been removed, use -vf scale=w:h for scaling.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"xsize", "-xsize has been removed, use -vf crop=w:h:x:y for cropping.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"x", "-x has been removed, use -vf scale=w:h for scaling.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"xsize", "-xsize has been removed, use -vf crop=w:h:x:y for cropping.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 
-	// output audio/video codec selection
-	{"oac", oac_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
-	{"ovc", ovc_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    // output audio/video codec selection
+    {"oac", oac_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"ovc", ovc_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 
-	// output file format
-	{"of", of_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    // output file format
+    {"of", of_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 
-	// override audio format tag in output file
-	{"fafmttag", &force_audiofmttag, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL},
-	// override FOURCC in output file
-	{"ffourcc", &force_fourcc, CONF_TYPE_STRING, CONF_GLOBAL, 4, 4, NULL},
+    // override audio format tag in output file
+    {"fafmttag", &force_audiofmttag, CONF_TYPE_INT, CONF_GLOBAL, 0, 0, NULL},
+    // override FOURCC in output file
+    {"ffourcc", &force_fourcc, CONF_TYPE_STRING, CONF_GLOBAL, 4, 4, NULL},
 
-	// override avi aspect autodetection
-	{"force-avi-aspect", &avi_aspect_override, CONF_TYPE_FLOAT, CONF_RANGE|CONF_GLOBAL, 0.2, 3.0, NULL},
+    // override avi aspect autodetection
+    {"force-avi-aspect", &avi_aspect_override, CONF_TYPE_FLOAT, CONF_RANGE|CONF_GLOBAL, 0.2, 3.0, NULL},
 
-	{"pass", "-pass has been removed, use -lavcopts vpass=n, -xvidencopts pass=n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"passlogfile", &passtmpfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"pass", "-pass has been removed, use -lavcopts vpass=n, -xvidencopts pass=n\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"passlogfile", &passtmpfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 
-	{"vobsubout", &vobsub_out, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
-	{"vobsuboutindex", &vobsub_out_index, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 31, NULL},
-	{"vobsuboutid", &vobsub_out_id, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"vobsubout", &vobsub_out, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"vobsuboutindex", &vobsub_out_index, CONF_TYPE_INT, CONF_RANGE|CONF_GLOBAL, 0, 31, NULL},
+    {"vobsuboutid", &vobsub_out_id, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 
-	{"autoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noautoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"autoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noautoexpand", &auto_expand, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	{"encodedups", &encode_duplicates, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noencodedups", &encode_duplicates, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"encodedups", &encode_duplicates, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noencodedups", &encode_duplicates, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	{"odml", &write_odml, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"noodml", &write_odml, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"odml", &write_odml, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"noodml", &write_odml, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
 
-	// info header strings
-	{"info", info_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    // info header strings
+    {"info", info_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 
 #ifdef CONFIG_MP3LAME
-	{"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
 #ifdef CONFIG_LIBAVCODEC
-	{"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #else
-	{"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_LIBAVCODEC */
 #ifdef CONFIG_TOOLAME
-	{"toolameopts", toolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"toolameopts", toolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #else
-	{"toolameopts", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"toolameopts", "MPlayer was compiled without libtoolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_TOOLAME */
 #ifdef CONFIG_TWOLAME
-	{"twolameopts", twolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"twolameopts", twolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #else
-	{"twolameopts", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"twolameopts", "MPlayer was compiled without libtwolame. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_TWOLAME */
 #ifdef CONFIG_FAAC
-	{"faacopts", faacopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"faacopts", faacopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #else
-	{"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* CONFIG_FAAC */
 #ifdef CONFIG_WIN32DLL
-	{"xvfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"xvfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
 #ifdef CONFIG_XVID4
-	{"xvidencopts", xvidencopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"xvidencopts", xvidencopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
 #if defined(CONFIG_X264)
-	{"x264encopts", &x264enc_set_param, CONF_TYPE_FUNC_PARAM, CONF_GLOBAL, 0, 0, NULL},
+    {"x264encopts", &x264enc_set_param, CONF_TYPE_FUNC_PARAM, CONF_GLOBAL, 0, 0, NULL},
 #endif
 
 #ifdef CONFIG_LIBLZO
-	{"nuvopts",  nuvopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"nuvopts",  nuvopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
-	{"mpegopts",  mpegopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"mpegopts",  mpegopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #ifdef CONFIG_LIBAVFORMAT
-	{"lavfopts",  lavfopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
+    {"lavfopts",  lavfopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
 
 #include "cfg-common-opts.h"
 
-//	{"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-//	{"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-//	{"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+//   {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+//   {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+//   {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 #endif /* MPLAYER_CFG_MENCODER_H */

Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/cfg-mplayer.h	Tue May  4 01:34:38 2010	(r31134)
@@ -69,16 +69,16 @@ extern int sws_flags;
 extern char* pp_help;
 
 const m_option_t vd_conf[]={
-	{"help", "Use MPlayer with an appropriate video file instead of live partners to avoid vd.\n", CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {"help", "Use MPlayer with an appropriate video file instead of live partners to avoid vd.\n", CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 #ifdef CONFIG_TV
 const m_option_t tvscan_conf[]={
-	{"autostart", &stream_tv_defaults.scan, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"threshold", &stream_tv_defaults.scan_threshold, CONF_TYPE_INT, CONF_RANGE, 1, 100, NULL},
-	{"period", &stream_tv_defaults.scan_period, CONF_TYPE_FLOAT, CONF_RANGE, 0.1, 2.0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {"autostart", &stream_tv_defaults.scan, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"threshold", &stream_tv_defaults.scan_threshold, CONF_TYPE_INT, CONF_RANGE, 1, 100, NULL},
+    {"period", &stream_tv_defaults.scan_period, CONF_TYPE_FLOAT, CONF_RANGE, 0.1, 2.0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 #endif
 /*
@@ -95,289 +95,289 @@ const m_option_t tvscan_conf[]={
  */
 
 const m_option_t mplayer_opts[]={
-	/* name, pointer, type, flags, min, max */
+    /* name, pointer, type, flags, min, max */
 
 //---------------------- libao/libvo options ------------------------
-	{"o", "Option -o has been renamed to -vo (video-out), use -vo.\n",
-            CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"vo", &video_driver_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-	{"ao", &audio_driver_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-	{"fixed-vo", &fixed_vo, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
-	{"nofixed-vo", &fixed_vo, CONF_TYPE_FLAG,CONF_GLOBAL, 1, 0, NULL},
-	{"ontop", &vo_ontop, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noontop", &vo_ontop, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"rootwin", &vo_rootwin, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"border", &vo_border, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noborder", &vo_border, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"o", "Option -o has been renamed to -vo (video-out), use -vo.\n",
+     CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"vo", &video_driver_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"ao", &audio_driver_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    {"fixed-vo", &fixed_vo, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
+    {"nofixed-vo", &fixed_vo, CONF_TYPE_FLAG,CONF_GLOBAL, 1, 0, NULL},
+    {"ontop", &vo_ontop, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noontop", &vo_ontop, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"rootwin", &vo_rootwin, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"border", &vo_border, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noborder", &vo_border, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	{"aop", "-aop has been removed, use -af instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-	{"dsp", "-dsp has been removed. Use -ao oss:dsp_path instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-        {"mixer", &mixer_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
-        {"mixer-channel", &mixer_channel, CONF_TYPE_STRING, 0, 0, 0, NULL},
-        {"softvol", &soft_vol, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-        {"nosoftvol", &soft_vol, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-        {"softvol-max", &soft_vol_max, CONF_TYPE_FLOAT, CONF_RANGE, 10, 10000, NULL},
-	{"volstep", &volstep, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
-	{"volume", &start_volume, CONF_TYPE_FLOAT, CONF_RANGE, -1, 10000, NULL},
-	{"master", "Option -master has been removed, use -af volume instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	// override audio buffer size (used only by -ao oss, anyway obsolete...)
-	{"abs", &ao_data.buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
+    {"aop", "-aop has been removed, use -af instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"dsp", "-dsp has been removed. Use -ao oss:dsp_path instead.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
+    {"mixer", &mixer_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"mixer-channel", &mixer_channel, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"softvol", &soft_vol, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nosoftvol", &soft_vol, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"softvol-max", &soft_vol_max, CONF_TYPE_FLOAT, CONF_RANGE, 10, 10000, NULL},
+    {"volstep", &volstep, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
+    {"volume", &start_volume, CONF_TYPE_FLOAT, CONF_RANGE, -1, 10000, NULL},
+    {"master", "Option -master has been removed, use -af volume instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    // override audio buffer size (used only by -ao oss, anyway obsolete...)
+    {"abs", &ao_data.buffersize, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
 
-	// -ao pcm options:
-	{"aofile", "-aofile has been removed. Use -ao pcm:file=<filename> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"waveheader", "-waveheader has been removed. Use -ao pcm:waveheader instead.\n", CONF_TYPE_PRINT, 0, 0, 1, NULL},
-	{"nowaveheader", "-nowaveheader has been removed. Use -ao pcm:nowaveheader instead.\n", CONF_TYPE_PRINT, 0, 1, 0, NULL},
+    // -ao pcm options:
+    {"aofile", "-aofile has been removed. Use -ao pcm:file=<filename> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"waveheader", "-waveheader has been removed. Use -ao pcm:waveheader instead.\n", CONF_TYPE_PRINT, 0, 0, 1, NULL},
+    {"nowaveheader", "-nowaveheader has been removed. Use -ao pcm:nowaveheader instead.\n", CONF_TYPE_PRINT, 0, 1, 0, NULL},
 
-	{"alsa", "-alsa has been removed. Remove it from your config file.\n",
-            CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"noalsa", "-noalsa has been removed. Remove it from your config file.\n",
-            CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"edlout", &edl_output_filename,  CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"alsa", "-alsa has been removed. Remove it from your config file.\n",
+     CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"noalsa", "-noalsa has been removed. Remove it from your config file.\n",
+     CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"edlout", &edl_output_filename,  CONF_TYPE_STRING, 0, 0, 0, NULL},
 
 #ifdef CONFIG_X11
-	{"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 
-	// -vo png only:
+    // -vo png only:
 #ifdef CONFIG_PNG
-	{"z", "-z has been removed. Use -vo png:z=<0-9> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"z", "-z has been removed. Use -vo png:z=<0-9> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif
-	// -vo jpeg only:
+    // -vo jpeg only:
 #ifdef CONFIG_JPEG
-	{"jpeg", "-jpeg has been removed. Use -vo jpeg:<options> instead.\n",
-	    CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"jpeg", "-jpeg has been removed. Use -vo jpeg:<options> instead.\n",
+     CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif
-	// -vo sdl only:
-	{"sdl", "Use -vo sdl:driver=<driver> instead of -vo sdl -sdl driver.\n",
-	    CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"noxv", "-noxv has been removed. Use -vo sdl:nohwaccel instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"forcexv", "-forcexv has been removed. Use -vo sdl:forcexv instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	// -ao sdl only:
-	{"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver.\n",
-	    CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    // -vo sdl only:
+    {"sdl", "Use -vo sdl:driver=<driver> instead of -vo sdl -sdl driver.\n",
+     CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"noxv", "-noxv has been removed. Use -vo sdl:nohwaccel instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"forcexv", "-forcexv has been removed. Use -vo sdl:forcexv instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    // -ao sdl only:
+    {"sdla", "Use -ao sdl:driver instead of -ao sdl -sdla driver.\n",
+     CONF_TYPE_PRINT, 0, 0, 0, NULL},
 
 #if defined(CONFIG_FBDEV) || defined(CONFIG_VESA)
-       {"monitor-hfreq", &monitor_hfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
-       {"monitor-vfreq", &monitor_vfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
-       {"monitor-dotclock", &monitor_dotclock_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"monitor-hfreq", &monitor_hfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"monitor-vfreq", &monitor_vfreq_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"monitor-dotclock", &monitor_dotclock_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 
 #ifdef CONFIG_FBDEV
-	{"fbmode", &fb_mode_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"fbmodeconfig", &fb_mode_cfgfile, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"fbmode", &fb_mode_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"fbmodeconfig", &fb_mode_cfgfile, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 #ifdef CONFIG_DIRECTFB
 #if DIRECTFBVERSION > 912
-	{"dfbopts", "-dfbopts has been removed. Use -vf directfb:dfbopts=... instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"dfbopts", "-dfbopts has been removed. Use -vf directfb:dfbopts=... instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif
 #endif
 
-	// force window width/height or resolution (with -vm)
-	{"x", &opt_screen_size_x, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
-	{"y", &opt_screen_size_y, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
-	// set screen dimensions (when not detectable or virtual!=visible)
-	{"screenw", &vo_screenwidth, CONF_TYPE_INT, CONF_RANGE|CONF_OLD, 0, 4096, NULL},
-	{"screenh", &vo_screenheight, CONF_TYPE_INT, CONF_RANGE|CONF_OLD, 0, 4096, NULL},
-	// Geometry string
-	{"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	// vo name (X classname) and window title strings
-	{"name", &vo_winname, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"title", &vo_wintitle, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	// set aspect ratio of monitor - useful for 16:9 TV-out
-	{"monitoraspect", &force_monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
-	{"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, NULL},
-	// video mode switching: (x11,xv,dga)
-        {"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-        {"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	// start in fullscreen mode:
-	{"fs", &fullscreen, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nofs", &fullscreen, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	// set fullscreen switch method (workaround for buggy WMs)
-	{"fsmode", "-fsmode is obsolete, avoid it and use -fstype instead.\nIf you really want it, try -fsmode-dontuse, but don't report bugs!\n", CONF_TYPE_PRINT, CONF_RANGE, 0, 31, NULL},
-	{"fsmode-dontuse", &vo_fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
-	// set bpp (x11+vm, dga, fbdev, vesa, svga?)
-        {"bpp", &vo_dbpp, CONF_TYPE_INT, CONF_RANGE, 0, 32, NULL},
-	{"colorkey", &vo_colorkey, CONF_TYPE_INT, 0, 0, 0, NULL},
-	{"nocolorkey", &vo_colorkey, CONF_TYPE_FLAG, 0, 0, 0x1000000, NULL},
-	{"double", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nodouble", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	// wait for v-sync (vesa)
-	{"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"panscan", &vo_panscan, CONF_TYPE_FLOAT, CONF_RANGE, -1.0, 1.0, NULL},
-	{"panscanrange", &vo_panscanrange, CONF_TYPE_FLOAT, CONF_RANGE, -19.0, 99.0, NULL},
+    // force window width/height or resolution (with -vm)
+    {"x", &opt_screen_size_x, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
+    {"y", &opt_screen_size_y, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL},
+    // set screen dimensions (when not detectable or virtual!=visible)
+    {"screenw", &vo_screenwidth, CONF_TYPE_INT, CONF_RANGE|CONF_OLD, 0, 4096, NULL},
+    {"screenh", &vo_screenheight, CONF_TYPE_INT, CONF_RANGE|CONF_OLD, 0, 4096, NULL},
+    // Geometry string
+    {"geometry", &vo_geometry, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    // vo name (X classname) and window title strings
+    {"name", &vo_winname, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"title", &vo_wintitle, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    // set aspect ratio of monitor - useful for 16:9 TV-out
+    {"monitoraspect", &force_monitor_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 9.0, NULL},
+    {"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, NULL},
+    // video mode switching: (x11,xv,dga)
+    {"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    // start in fullscreen mode:
+    {"fs", &fullscreen, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nofs", &fullscreen, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    // set fullscreen switch method (workaround for buggy WMs)
+    {"fsmode", "-fsmode is obsolete, avoid it and use -fstype instead.\nIf you really want it, try -fsmode-dontuse, but don't report bugs!\n", CONF_TYPE_PRINT, CONF_RANGE, 0, 31, NULL},
+    {"fsmode-dontuse", &vo_fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
+    // set bpp (x11+vm, dga, fbdev, vesa, svga?)
+    {"bpp", &vo_dbpp, CONF_TYPE_INT, CONF_RANGE, 0, 32, NULL},
+    {"colorkey", &vo_colorkey, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"nocolorkey", &vo_colorkey, CONF_TYPE_FLAG, 0, 0, 0x1000000, NULL},
+    {"double", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nodouble", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    // wait for v-sync (vesa)
+    {"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"panscan", &vo_panscan, CONF_TYPE_FLOAT, CONF_RANGE, -1.0, 1.0, NULL},
+    {"panscanrange", &vo_panscanrange, CONF_TYPE_FLOAT, CONF_RANGE, -19.0, 99.0, NULL},
 
-	{"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nograbpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nograbpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
     {"adapter", &vo_adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL},
     {"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL},
-	{"wid", &WinID, CONF_TYPE_INT64, 0, 0, 0, NULL},
+    {"wid", &WinID, CONF_TYPE_INT64, 0, 0, 0, NULL},
 #ifdef CONFIG_X11
-	// x11,xv,xmga,xvidix
-	{"icelayer", "-icelayer has been removed. Use -fstype layer:<number> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"stop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nostop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"stop_xscreensaver", "Use -stop-xscreensaver instead, options with _ have been obsoleted.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
+    // x11,xv,xmga,xvidix
+    {"icelayer", "-icelayer has been removed. Use -fstype layer:<number> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"stop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nostop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"stop_xscreensaver", "Use -stop-xscreensaver instead, options with _ have been obsoleted.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"fstype", &vo_fstype_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 #endif
-	{"heartbeat-cmd", &heartbeat_cmd, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"mouseinput", &vo_nomouse_input, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0, 0, 1, NULL},
+    {"heartbeat-cmd", &heartbeat_cmd, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"mouseinput", &vo_nomouse_input, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"nomouseinput", &vo_nomouse_input, CONF_TYPE_FLAG,0, 0, 1, NULL},
 
-	{"xineramascreen", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, -2, 32, NULL},
+    {"xineramascreen", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, -2, 32, NULL},
 
-	{"brightness",&vo_gamma_brightness, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
-	{"saturation",&vo_gamma_saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
-	{"contrast",&vo_gamma_contrast, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
-	{"hue",&vo_gamma_hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
-	{"keepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nokeepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"brightness",&vo_gamma_brightness, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+    {"saturation",&vo_gamma_saturation, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+    {"contrast",&vo_gamma_contrast, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+    {"hue",&vo_gamma_hue, CONF_TYPE_INT, CONF_RANGE, -100, 100, NULL},
+    {"keepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nokeepaspect", &vo_keepaspect, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	// direct rendering (decoding to video out buffer)
-	{"dr", &vo_directrendering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"nodr", &vo_directrendering, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"vaa_dr", "-vaa_dr has been removed, use -dr.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"vaa_nodr", "-vaa_nodr has been removed, use -nodr.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    // direct rendering (decoding to video out buffer)
+    {"dr", &vo_directrendering, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nodr", &vo_directrendering, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"vaa_dr", "-vaa_dr has been removed, use -dr.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"vaa_nodr", "-vaa_nodr has been removed, use -nodr.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 
 #ifdef CONFIG_AA
-	// -vo aa
-	{"aa*", "-aa* has been removed. Use -vo aa:suboption instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    // -vo aa
+    {"aa*", "-aa* has been removed. Use -vo aa:suboption instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif
 
 #ifdef CONFIG_ZR
-	// -vo zr
-	{"zr*", vo_zr_parseoption, CONF_TYPE_FUNC_FULL, 0, 0, 0, &vo_zr_revertoption },
+    // -vo zr
+    {"zr*", vo_zr_parseoption, CONF_TYPE_FUNC_FULL, 0, 0, 0, &vo_zr_revertoption },
 #endif
 
 #ifdef CONFIG_DXR2
-	{"dxr2", &dxr2_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"dxr2", &dxr2_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
 
 
 //---------------------- mplayer-only options ------------------------
 
-	{"use-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"nouse-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
-	{"use-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"nouse-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"use-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"nouse-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"use-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"nouse-filename-title", &use_filename_title, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
 #ifdef CONFIG_CRASH_DEBUG
-	{"crash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"nocrash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"crash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"nocrash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
 #endif
-	{"osdlevel", &osd_level, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
-	{"osd-duration", &osd_duration, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
+    {"osdlevel", &osd_level, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
+    {"osd-duration", &osd_duration, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
 #ifdef CONFIG_MENU
-	{"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
-	{"menu-root", &menu_root, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
-	{"menu-cfg", &menu_cfg, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
-	{"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"menu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"nomenu", &use_menu, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"menu-root", &menu_root, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"menu-cfg", &menu_cfg, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #ifdef CONFIG_FRIBIDI
-	{"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #endif /* CONFIG_FRIBIDI */
 #else
-	{"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
+    {"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
 #endif /* CONFIG_MENU */
 
-	// these should be moved to -common, and supported in MEncoder
-	{"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
+    // these should be moved to -common, and supported in MEncoder
+    {"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
 #ifdef CONFIG_UNRAR_EXEC
-	{"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 
-	{"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
+    {"sstep", &step_sec, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL},
 
-	{"framedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"hardframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 2, NULL},
-	{"noframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"framedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"hardframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 0, 2, NULL},
+    {"noframedrop", &frame_dropping, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-	{"autoq", &auto_quality, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
+    {"autoq", &auto_quality, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
 
-	{"benchmark", &benchmark, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"benchmark", &benchmark, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 
-	// dump some stream out instead of playing the file
-	// this really should be in MEncoder instead of MPlayer... -> TODO
-	{"dumpfile", &stream_dump_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"dumpaudio", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"dumpvideo", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 2, NULL},
-	{"dumpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 3, NULL},
-	{"dumpmpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 4, NULL},
-	{"dumpstream", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 5, NULL},
-	{"dumpsrtsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 6, NULL},
-	{"dumpmicrodvdsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 7, NULL},
-	{"dumpjacosub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 8, NULL},
-	{"dumpsami", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 9, NULL},
+    // dump some stream out instead of playing the file
+    // this really should be in MEncoder instead of MPlayer... -> TODO
+    {"dumpfile", &stream_dump_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"dumpaudio", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"dumpvideo", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 2, NULL},
+    {"dumpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 3, NULL},
+    {"dumpmpsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 4, NULL},
+    {"dumpstream", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 5, NULL},
+    {"dumpsrtsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 6, NULL},
+    {"dumpmicrodvdsub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 7, NULL},
+    {"dumpjacosub", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 8, NULL},
+    {"dumpsami", &stream_dump_type, CONF_TYPE_FLAG, 0, 0, 9, NULL},
 
 #ifdef CONFIG_LIRC
-	{"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"lircconf", &lirc_configfile, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 #endif
 
-	{"gui", "The -gui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1},
-	{"nogui", "The -nogui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1},
+    {"gui", "The -gui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1},
+    {"nogui", "The -nogui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1},
 
 #ifdef CONFIG_GUI
-	{"skin", &skinName, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
-	{"enqueue", &enqueue, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noenqueue", &enqueue, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"guiwid", &guiWinID, CONF_TYPE_INT, 0, 0, 0, NULL},
+    {"skin", &skinName, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
+    {"enqueue", &enqueue, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noenqueue", &enqueue, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"guiwid", &guiWinID, CONF_TYPE_INT, 0, 0, 0, NULL},
 #endif
 
-	{"noloop", &mpctx_s.loop_times, CONF_TYPE_FLAG, 0, 0, -1, NULL},
-	{"loop", &mpctx_s.loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000, NULL},
-	{"playlist", NULL, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"noloop", &mpctx_s.loop_times, CONF_TYPE_FLAG, 0, 0, -1, NULL},
+    {"loop", &mpctx_s.loop_times, CONF_TYPE_INT, CONF_RANGE, -1, 10000, NULL},
+    {"playlist", NULL, CONF_TYPE_STRING, 0, 0, 0, NULL},
 
-	// a-v sync stuff:
-        {"correct-pts", &user_correct_pts, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-        {"nocorrect-pts", &user_correct_pts, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"noautosync", &autosync, CONF_TYPE_FLAG, 0, 0, -1, NULL},
-	{"autosync", &autosync, CONF_TYPE_INT, CONF_RANGE, 0, 10000, NULL},
+    // a-v sync stuff:
+    {"correct-pts", &user_correct_pts, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"nocorrect-pts", &user_correct_pts, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"noautosync", &autosync, CONF_TYPE_FLAG, 0, 0, -1, NULL},
+    {"autosync", &autosync, CONF_TYPE_INT, CONF_RANGE, 0, 10000, NULL},
 
-	{"softsleep", &softsleep, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"softsleep", &softsleep, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 #ifdef HAVE_RTC
-	{"nortc", &nortc, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"rtc", &nortc, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-	{"rtc-device", &rtc_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"nortc", &nortc, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"rtc", &nortc, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"rtc-device", &rtc_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 
-	{"term-osd", &term_osd, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-	{"noterm-osd", &term_osd, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-    	{"term-osd-esc", &term_osd_esc, CONF_TYPE_STRING, 0, 0, 1, NULL},
-	{"playing-msg", &playing_msg, CONF_TYPE_STRING, 0, 0, 0, NULL},
+    {"term-osd", &term_osd, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+    {"noterm-osd", &term_osd, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+    {"term-osd-esc", &term_osd_esc, CONF_TYPE_STRING, 0, 0, 1, NULL},
+    {"playing-msg", &playing_msg, CONF_TYPE_STRING, 0, 0, 0, NULL},
 
-	{"slave", &slave_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
-	{"idle", &player_idle_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
-	{"noidle", &player_idle_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 1, 0, NULL},
-	{"use-stdin", "-use-stdin has been renamed to -noconsolecontrols, use that instead.", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-	{"key-fifo-size", &key_fifo_size, CONF_TYPE_INT, CONF_RANGE, 2, 65000, NULL},
-	{"noconsolecontrols", &noconsolecontrols, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"consolecontrols", &noconsolecontrols, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
-	{"mouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"nomouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
-	{"doubleclick-time", &doubleclick_time, CONF_TYPE_INT, CONF_RANGE, 0, 1000, NULL},
+    {"slave", &slave_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
+    {"idle", &player_idle_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
+    {"noidle", &player_idle_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 1, 0, NULL},
+    {"use-stdin", "-use-stdin has been renamed to -noconsolecontrols, use that instead.", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"key-fifo-size", &key_fifo_size, CONF_TYPE_INT, CONF_RANGE, 2, 65000, NULL},
+    {"noconsolecontrols", &noconsolecontrols, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"consolecontrols", &noconsolecontrols, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"mouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"nomouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
+    {"doubleclick-time", &doubleclick_time, CONF_TYPE_INT, CONF_RANGE, 0, 1000, NULL},
 #ifdef CONFIG_TV
-	{"tvscan", tvscan_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {"tvscan", tvscan_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #else
-	{"tvscan", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
+    {"tvscan", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 #endif /* CONFIG_TV */
 
 #include "cfg-common-opts.h"
 
-	{"list-properties", &list_properties, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-	{"identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_FLAG, CONF_GLOBAL, 0, MSGL_V, NULL},
-	{"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
-	{"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
-	{"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
+    {"list-properties", &list_properties, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+    {"identify", &mp_msg_levels[MSGT_IDENTIFY], CONF_TYPE_FLAG, CONF_GLOBAL, 0, MSGL_V, NULL},
+    {"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
+    {"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
+    {"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
 
-	{"vd", vd_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
-	{NULL, NULL, 0, 0, 0, 0, NULL}
+    {"vd", vd_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
+    {NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
 #endif /* MPLAYER_CFG_MPLAYER_H */

Modified: trunk/codec-cfg.c
==============================================================================
--- trunk/codec-cfg.c	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/codec-cfg.c	Tue May  4 01:34:38 2010	(r31134)
@@ -65,393 +65,393 @@
 
 #define PRINT_LINENUM mp_msg(MSGT_CODECCFG,MSGL_ERR," at line %d\n", line_num)
 
-#define MAX_NR_TOKEN	16
+#define MAX_NR_TOKEN    16
 
-#define MAX_LINE_LEN	1000
+#define MAX_LINE_LEN    1000
 
-#define RET_EOF		-1
-#define RET_EOL		-2
+#define RET_EOF         -1
+#define RET_EOL         -2
 
-#define TYPE_VIDEO	0
-#define TYPE_AUDIO	1
+#define TYPE_VIDEO      0
+#define TYPE_AUDIO      1
 
 char * codecs_file = NULL;
 
 static int add_to_fourcc(char *s, char *alias, unsigned int *fourcc,
-		unsigned int *map)
+                         unsigned int *map)
 {
-	int i, j, freeslots;
-	unsigned int tmp;
+    int i, j, freeslots;
+    unsigned int tmp;
 
-	/* find first unused slot */
-	for (i = 0; i < CODECS_MAX_FOURCC && fourcc[i] != 0xffffffff; i++)
-		/* NOTHING */;
-	freeslots = CODECS_MAX_FOURCC - i;
-	if (!freeslots)
-		goto err_out_too_many;
+    /* find first unused slot */
+    for (i = 0; i < CODECS_MAX_FOURCC && fourcc[i] != 0xffffffff; i++)
+        /* NOTHING */;
+    freeslots = CODECS_MAX_FOURCC - i;
+    if (!freeslots)
+        goto err_out_too_many;
 
-	do {
-		tmp = mmioFOURCC(s[0], s[1], s[2], s[3]);
-		for (j = 0; j < i; j++)
-			if (tmp == fourcc[j])
-				goto err_out_duplicated;
-		fourcc[i] = tmp;
-		map[i] = alias ? mmioFOURCC(alias[0], alias[1], alias[2], alias[3]) : tmp;
-		s += 4;
-		i++;
-	} while ((*(s++) == ',') && --freeslots);
+    do {
+        tmp = mmioFOURCC(s[0], s[1], s[2], s[3]);
+        for (j = 0; j < i; j++)
+            if (tmp == fourcc[j])
+                goto err_out_duplicated;
+        fourcc[i] = tmp;
+        map[i] = alias ? mmioFOURCC(alias[0], alias[1], alias[2], alias[3]) : tmp;
+        s += 4;
+        i++;
+    } while ((*(s++) == ',') && --freeslots);
 
-	if (!freeslots)
-		goto err_out_too_many;
-	if (*(--s) != '\0')
-		goto err_out_parse_error;
-	return 1;
+    if (!freeslots)
+        goto err_out_too_many;
+    if (*(--s) != '\0')
+        goto err_out_parse_error;
+    return 1;
 err_out_duplicated:
-	mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_DuplicateFourcc);
-	return 0;
+    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_DuplicateFourcc);
+    return 0;
 err_out_too_many:
-	mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyFourccs);
-	return 0;
+    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyFourccs);
+    return 0;
 err_out_parse_error:
-	mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
-	return 0;
+    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
+    return 0;
 }
 
 static int add_to_format(char *s, char *alias,unsigned int *fourcc, unsigned int *fourccmap)
 {
-	int i, j;
-	char *endptr;
+    int i, j;
+    char *endptr;
 
-	/* find first unused slot */
-	for (i = 0; i < CODECS_MAX_FOURCC && fourcc[i] != 0xffffffff; i++)
-		/* NOTHING */;
-	if (i == CODECS_MAX_FOURCC) {
-		mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyFourccs);
-		return 0;
-	}
+    /* find first unused slot */
+    for (i = 0; i < CODECS_MAX_FOURCC && fourcc[i] != 0xffffffff; i++)
+        /* NOTHING */;
+    if (i == CODECS_MAX_FOURCC) {
+        mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyFourccs);
+        return 0;
+    }
 
-        fourcc[i]=strtoul(s,&endptr,0);
-	if (*endptr != '\0') {
-		mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseErrorFIDNotNumber);
-		return 0;
-	}
+    fourcc[i]=strtoul(s,&endptr,0);
+    if (*endptr != '\0') {
+        mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseErrorFIDNotNumber);
+        return 0;
+    }
 
-	if(alias){
-	    fourccmap[i]=strtoul(alias,&endptr,0);
-	    if (*endptr != '\0') {
-		mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseErrorFIDAliasNotNumber);
-		return 0;
-	    }
-	} else
-	    fourccmap[i]=fourcc[i];
+    if(alias){
+        fourccmap[i]=strtoul(alias,&endptr,0);
+        if (*endptr != '\0') {
+            mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseErrorFIDAliasNotNumber);
+            return 0;
+        }
+    } else
+        fourccmap[i]=fourcc[i];
 
-	for (j = 0; j < i; j++)
-		if (fourcc[j] == fourcc[i]) {
-			mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_DuplicateFID);
-			return 0;
-		}
+    for (j = 0; j < i; j++)
+        if (fourcc[j] == fourcc[i]) {
+            mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_DuplicateFID);
+            return 0;
+        }
 
-	return 1;
+    return 1;
 }
 
-        static const struct {
-	        const char *name;
-	        const unsigned int num;
-	} fmt_table[] = {
-		// note: due to parser deficiencies/simplicity, if one format
-		// name matches the beginning of another, the longer one _must_
-		// come first in this list.
-		{"YV12",  IMGFMT_YV12},
-		{"I420",  IMGFMT_I420},
-		{"IYUV",  IMGFMT_IYUV},
-		{"NV12",  IMGFMT_NV12},
-		{"NV21",  IMGFMT_NV21},
-		{"YVU9",  IMGFMT_YVU9},
-		{"IF09",  IMGFMT_IF09},
-		{"444P16LE", IMGFMT_444P16_LE},
-		{"444P16BE", IMGFMT_444P16_BE},
-		{"422P16LE", IMGFMT_422P16_LE},
-		{"422P16BE", IMGFMT_422P16_BE},
-		{"420P16LE", IMGFMT_420P16_LE},
-		{"420P16BE", IMGFMT_420P16_BE},
-		{"444P16", IMGFMT_444P16},
-		{"422P16", IMGFMT_422P16},
-		{"420P16", IMGFMT_420P16},
-		{"420A",  IMGFMT_420A},
-		{"444P",  IMGFMT_444P},
-		{"422P",  IMGFMT_422P},
-		{"411P",  IMGFMT_411P},
-		{"440P",  IMGFMT_440P},
-		{"Y800",  IMGFMT_Y800},
-		{"Y8",    IMGFMT_Y8},
+    static const struct {
+        const char *name;
+        const unsigned int num;
+    } fmt_table[] = {
+        // note: due to parser deficiencies/simplicity, if one format
+        // name matches the beginning of another, the longer one _must_
+        // come first in this list.
+        {"YV12",  IMGFMT_YV12},
+        {"I420",  IMGFMT_I420},
+        {"IYUV",  IMGFMT_IYUV},
+        {"NV12",  IMGFMT_NV12},
+        {"NV21",  IMGFMT_NV21},
+        {"YVU9",  IMGFMT_YVU9},
+        {"IF09",  IMGFMT_IF09},
+        {"444P16LE", IMGFMT_444P16_LE},
+        {"444P16BE", IMGFMT_444P16_BE},
+        {"422P16LE", IMGFMT_422P16_LE},
+        {"422P16BE", IMGFMT_422P16_BE},
+        {"420P16LE", IMGFMT_420P16_LE},
+        {"420P16BE", IMGFMT_420P16_BE},
+        {"444P16", IMGFMT_444P16},
+        {"422P16", IMGFMT_422P16},
+        {"420P16", IMGFMT_420P16},
+        {"420A",  IMGFMT_420A},
+        {"444P",  IMGFMT_444P},
+        {"422P",  IMGFMT_422P},
+        {"411P",  IMGFMT_411P},
+        {"440P",  IMGFMT_440P},
+        {"Y800",  IMGFMT_Y800},
+        {"Y8",    IMGFMT_Y8},
 
-		{"YUY2",  IMGFMT_YUY2},
-		{"UYVY",  IMGFMT_UYVY},
-		{"YVYU",  IMGFMT_YVYU},
+        {"YUY2",  IMGFMT_YUY2},
+        {"UYVY",  IMGFMT_UYVY},
+        {"YVYU",  IMGFMT_YVYU},
 
-		{"RGB48LE",  IMGFMT_RGB48LE},
-		{"RGB48BE",  IMGFMT_RGB48BE},
-	        {"RGB4",  IMGFMT_RGB4},
-	        {"RGB8",  IMGFMT_RGB8},
-		{"RGB15", IMGFMT_RGB15},
-		{"RGB16", IMGFMT_RGB16},
-		{"RGB24", IMGFMT_RGB24},
-		{"RGB32", IMGFMT_RGB32},
-		{"BGR4",  IMGFMT_BGR4},
-		{"BGR8",  IMGFMT_BGR8},
-		{"BGR15", IMGFMT_BGR15},
-		{"BGR16", IMGFMT_BGR16},
-		{"BGR24", IMGFMT_BGR24},
-		{"BGR32", IMGFMT_BGR32},
-	        {"RGB1",  IMGFMT_RGB1},
-		{"BGR1",  IMGFMT_BGR1},
+        {"RGB48LE",  IMGFMT_RGB48LE},
+        {"RGB48BE",  IMGFMT_RGB48BE},
+        {"RGB4",  IMGFMT_RGB4},
+        {"RGB8",  IMGFMT_RGB8},
+        {"RGB15", IMGFMT_RGB15},
+        {"RGB16", IMGFMT_RGB16},
+        {"RGB24", IMGFMT_RGB24},
+        {"RGB32", IMGFMT_RGB32},
+        {"BGR4",  IMGFMT_BGR4},
+        {"BGR8",  IMGFMT_BGR8},
+        {"BGR15", IMGFMT_BGR15},
+        {"BGR16", IMGFMT_BGR16},
+        {"BGR24", IMGFMT_BGR24},
+        {"BGR32", IMGFMT_BGR32},
+        {"RGB1",  IMGFMT_RGB1},
+        {"BGR1",  IMGFMT_BGR1},
 
-		{"MPES",  IMGFMT_MPEGPES},
-		{"ZRMJPEGNI", IMGFMT_ZRMJPEGNI},
-		{"ZRMJPEGIT", IMGFMT_ZRMJPEGIT},
-		{"ZRMJPEGIB", IMGFMT_ZRMJPEGIB},
+        {"MPES",  IMGFMT_MPEGPES},
+        {"ZRMJPEGNI", IMGFMT_ZRMJPEGNI},
+        {"ZRMJPEGIT", IMGFMT_ZRMJPEGIT},
+        {"ZRMJPEGIB", IMGFMT_ZRMJPEGIB},
 
-		{"IDCT_MPEG2",IMGFMT_XVMC_IDCT_MPEG2},
-		{"MOCO_MPEG2",IMGFMT_XVMC_MOCO_MPEG2},
+        {"IDCT_MPEG2",IMGFMT_XVMC_IDCT_MPEG2},
+        {"MOCO_MPEG2",IMGFMT_XVMC_MOCO_MPEG2},
 
-		{"VDPAU_MPEG1",IMGFMT_VDPAU_MPEG1},
-		{"VDPAU_MPEG2",IMGFMT_VDPAU_MPEG2},
-		{"VDPAU_H264",IMGFMT_VDPAU_H264},
-		{"VDPAU_WMV3",IMGFMT_VDPAU_WMV3},
-		{"VDPAU_VC1",IMGFMT_VDPAU_VC1},
-		{"VDPAU_MPEG4",IMGFMT_VDPAU_MPEG4},
+        {"VDPAU_MPEG1",IMGFMT_VDPAU_MPEG1},
+        {"VDPAU_MPEG2",IMGFMT_VDPAU_MPEG2},
+        {"VDPAU_H264",IMGFMT_VDPAU_H264},
+        {"VDPAU_WMV3",IMGFMT_VDPAU_WMV3},
+        {"VDPAU_VC1",IMGFMT_VDPAU_VC1},
+        {"VDPAU_MPEG4",IMGFMT_VDPAU_MPEG4},
 
-		{NULL,    0}
-	};
+        {NULL,    0}
+    };
 
 
 static int add_to_inout(char *sfmt, char *sflags, unsigned int *outfmt,
-		unsigned char *outflags)
+                        unsigned char *outflags)
 {
 
-	static char *flagstr[] = {
-		"flip",
-		"noflip",
-		"yuvhack",
-		"query",
-		"static",
-		NULL
-	};
+    static char *flagstr[] = {
+        "flip",
+        "noflip",
+        "yuvhack",
+        "query",
+        "static",
+        NULL
+    };
 
-	int i, j, freeslots;
-	unsigned char flags;
+    int i, j, freeslots;
+    unsigned char flags;
 
-	for (i = 0; i < CODECS_MAX_OUTFMT && outfmt[i] != 0xffffffff; i++)
-		/* NOTHING */;
-	freeslots = CODECS_MAX_OUTFMT - i;
-	if (!freeslots)
-		goto err_out_too_many;
+    for (i = 0; i < CODECS_MAX_OUTFMT && outfmt[i] != 0xffffffff; i++)
+        /* NOTHING */;
+    freeslots = CODECS_MAX_OUTFMT - i;
+    if (!freeslots)
+        goto err_out_too_many;
 
-	flags = 0;
-	if(sflags) {
-		do {
-			for (j = 0; flagstr[j] != NULL; j++)
-				if (!strncmp(sflags, flagstr[j],
-							strlen(flagstr[j])))
-					break;
-			if (flagstr[j] == NULL)
-				goto err_out_parse_error;
-			flags|=(1<<j);
-			sflags+=strlen(flagstr[j]);
-		} while (*(sflags++) == ',');
+    flags = 0;
+    if(sflags) {
+        do {
+            for (j = 0; flagstr[j] != NULL; j++)
+                if (!strncmp(sflags, flagstr[j],
+                             strlen(flagstr[j])))
+                    break;
+            if (flagstr[j] == NULL)
+                goto err_out_parse_error;
+            flags|=(1<<j);
+            sflags+=strlen(flagstr[j]);
+        } while (*(sflags++) == ',');
 
-		if (*(--sflags) != '\0')
-			goto err_out_parse_error;
-	}
+        if (*(--sflags) != '\0')
+            goto err_out_parse_error;
+    }
 
-	do {
-		for (j = 0; fmt_table[j].name != NULL; j++)
-			if (!strncmp(sfmt, fmt_table[j].name, strlen(fmt_table[j].name)))
-				break;
-		if (fmt_table[j].name == NULL)
-			goto err_out_parse_error;
-		outfmt[i] = fmt_table[j].num;
-		outflags[i] = flags;
-                ++i;
-		sfmt+=strlen(fmt_table[j].name);
-	} while ((*(sfmt++) == ',') && --freeslots);
+    do {
+        for (j = 0; fmt_table[j].name != NULL; j++)
+            if (!strncmp(sfmt, fmt_table[j].name, strlen(fmt_table[j].name)))
+                break;
+        if (fmt_table[j].name == NULL)
+            goto err_out_parse_error;
+        outfmt[i] = fmt_table[j].num;
+        outflags[i] = flags;
+        ++i;
+        sfmt+=strlen(fmt_table[j].name);
+    } while ((*(sfmt++) == ',') && --freeslots);
 
-	if (!freeslots)
-		goto err_out_too_many;
+    if (!freeslots)
+        goto err_out_too_many;
 
-	if (*(--sfmt) != '\0')
-		goto err_out_parse_error;
+    if (*(--sfmt) != '\0')
+        goto err_out_parse_error;
 
-	return 1;
+    return 1;
 err_out_too_many:
-	mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyOut);
-	return 0;
+    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_TooManyOut);
+    return 0;
 err_out_parse_error:
-	mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
-	return 0;
+    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
+    return 0;
 }
 
 #if 0
 static short get_driver(char *s,int audioflag)
 {
-	static char *audiodrv[] = {
-		"null",
-		"mp3lib",
-		"pcm",
-		"libac3",
-		"acm",
-		"alaw",
-		"msgsm",
-		"dshow",
-		"dvdpcm",
-		"hwac3",
-		"libvorbis",
-		"ffmpeg",
-		"libmad",
-		"msadpcm",
-		"liba52",
-		"g72x",
-		"imaadpcm",
-		"dk4adpcm",
-		"dk3adpcm",
-		"roqaudio",
-		"faad",
-		"realaud",
-		"libdv",
-		NULL
-	};
-	static char *videodrv[] = {
-		"null",
-		"libmpeg2",
-		"vfw",
-		"dshow",
-		"ffmpeg",
-		"vfwex",
-		"raw",
-		"msrle",
-		"xanim",
-		"msvidc",
-		"fli",
-		"cinepak",
-		"qtrle",
-		"nuv",
-		"cyuv",
-		"qtsmc",
-		"ducktm1",
-		"roqvideo",
-		"qtrpza",
-		"mpng",
-		"ijpg",
-		"zlib",
-		"mpegpes",
-		"zrmjpeg",
-		"realvid",
-		"xvid",
-		"libdv",
-		NULL
-	};
-        char **drv=audioflag?audiodrv:videodrv;
-        int i;
+    static char *audiodrv[] = {
+        "null",
+        "mp3lib",
+        "pcm",
+        "libac3",
+        "acm",
+        "alaw",
+        "msgsm",
+        "dshow",
+        "dvdpcm",
+        "hwac3",
+        "libvorbis",
+        "ffmpeg",
+        "libmad",
+        "msadpcm",
+        "liba52",
+        "g72x",
+        "imaadpcm",
+        "dk4adpcm",
+        "dk3adpcm",
+        "roqaudio",
+        "faad",
+        "realaud",
+        "libdv",
+        NULL
+    };
+    static char *videodrv[] = {
+        "null",
+        "libmpeg2",
+        "vfw",
+        "dshow",
+        "ffmpeg",
+        "vfwex",
+        "raw",
+        "msrle",
+        "xanim",
+        "msvidc",
+        "fli",
+        "cinepak",
+        "qtrle",
+        "nuv",
+        "cyuv",
+        "qtsmc",
+        "ducktm1",
+        "roqvideo",
+        "qtrpza",
+        "mpng",
+        "ijpg",
+        "zlib",
+        "mpegpes",
+        "zrmjpeg",
+        "realvid",
+        "xvid",
+        "libdv",
+        NULL
+    };
+    char **drv=audioflag?audiodrv:videodrv;
+    int i;
 
-        for(i=0;drv[i];i++) if(!strcmp(s,drv[i])) return i;
+    for(i=0;drv[i];i++) if(!strcmp(s,drv[i])) return i;
 
-	return -1;
+    return -1;
 }
 #endif
 
 static int validate_codec(codecs_t *c, int type)
 {
-	unsigned int i;
-	char *tmp_name = c->name;
+    unsigned int i;
+    char *tmp_name = c->name;
 
-	for (i = 0; i < strlen(tmp_name) && isalnum(tmp_name[i]); i++)
-		/* NOTHING */;
+    for (i = 0; i < strlen(tmp_name) && isalnum(tmp_name[i]); i++)
+        /* NOTHING */;
 
-	if (i < strlen(tmp_name)) {
-		mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_InvalidCodecName, c->name);
-		return 0;
-	}
+    if (i < strlen(tmp_name)) {
+        mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_InvalidCodecName, c->name);
+        return 0;
+    }
 
-	if (!c->info)
-		c->info = strdup(c->name);
+    if (!c->info)
+        c->info = strdup(c->name);
 
 #if 0
-	if (c->fourcc[0] == 0xffffffff) {
-		mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksFourcc, c->name);
-		return 0;
-	}
+    if (c->fourcc[0] == 0xffffffff) {
+        mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksFourcc, c->name);
+        return 0;
+    }
 #endif
 
-	if (!c->drv) {
-		mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksDriver, c->name);
-		return 0;
-	}
+    if (!c->drv) {
+        mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecLacksDriver, c->name);
+        return 0;
+    }
 
 #if 0
 #warning codec->driver == 4;... <- this should not be put in here...
 #warning Where are they defined ????????????
-	if (!c->dll && (c->driver == 4 ||
-				(c->driver == 2 && type == TYPE_VIDEO))) {
-		mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNeedsDLL, c->name);
-		return 0;
-	}
+    if (!c->dll && (c->driver == 4 ||
+                (c->driver == 2 && type == TYPE_VIDEO))) {
+        mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNeedsDLL, c->name);
+        return 0;
+    }
 #warning Can guid.f1 be 0? How does one know that it was not given?
-//	if (!(codec->flags & CODECS_FLAG_AUDIO) && codec->driver == 4)
+//      if (!(codec->flags & CODECS_FLAG_AUDIO) && codec->driver == 4)
 
-	if (type == TYPE_VIDEO)
-		if (c->outfmt[0] == 0xffffffff) {
-			mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNeedsOutfmt, c->name);
-			return 0;
-		}
+    if (type == TYPE_VIDEO)
+        if (c->outfmt[0] == 0xffffffff) {
+            mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNeedsOutfmt, c->name);
+            return 0;
+        }
 #endif
-	return 1;
+    return 1;
 }
 
 static int add_comment(char *s, char **d)
 {
-	int pos;
+    int pos;
 
-	if (!*d)
-		pos = 0;
-	else {
-		pos = strlen(*d);
-		(*d)[pos++] = '\n';
-	}
-	if (!(*d = realloc(*d, pos + strlen(s) + 1))) {
-		mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantAllocateComment);
-		return 0;
-	}
-	strcpy(*d + pos, s);
-	return 1;
+    if (!*d)
+        pos = 0;
+    else {
+        pos = strlen(*d);
+        (*d)[pos++] = '\n';
+    }
+    if (!(*d = realloc(*d, pos + strlen(s) + 1))) {
+        mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantAllocateComment);
+        return 0;
+    }
+    strcpy(*d + pos, s);
+    return 1;
 }
 
 static short get_cpuflags(char *s)
 {
-	static char *flagstr[] = {
-		"mmx",
-		"sse",
-		"3dnow",
-		NULL
-	};
-        int i;
-	short flags = 0;
+    static char *flagstr[] = {
+        "mmx",
+        "sse",
+        "3dnow",
+        NULL
+    };
+    int i;
+    short flags = 0;
 
-	do {
-		for (i = 0; flagstr[i]; i++)
-			if (!strncmp(s, flagstr[i], strlen(flagstr[i])))
-				break;
-		if (!flagstr[i])
-			goto err_out_parse_error;
-		flags |= 1<<i;
-		s += strlen(flagstr[i]);
-	} while (*(s++) == ',');
+    do {
+        for (i = 0; flagstr[i]; i++)
+            if (!strncmp(s, flagstr[i], strlen(flagstr[i])))
+                break;
+        if (!flagstr[i])
+            goto err_out_parse_error;
+        flags |= 1<<i;
+        s += strlen(flagstr[i]);
+    } while (*(s++) == ',');
 
-	if (*(--s) != '\0')
-		goto err_out_parse_error;
+    if (*(--s) != '\0')
+        goto err_out_parse_error;
 
-	return flags;
+    return flags;
 err_out_parse_error:
-	return 0;
+    return 0;
 }
 
 static FILE *fp;
@@ -462,61 +462,61 @@ static int read_nextline = 1;
 
 static int get_token(int min, int max)
 {
-	static int line_pos;
-	int i;
-	char c;
+    static int line_pos;
+    int i;
+    char c;
 
-	if (max >= MAX_NR_TOKEN) {
-		mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN);
-		goto out_eof;
-	}
+    if (max >= MAX_NR_TOKEN) {
+        mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_GetTokenMaxNotLessThanMAX_NR_TOKEN);
+        goto out_eof;
+    }
 
-	memset(token, 0x00, sizeof(*token) * max);
+    memset(token, 0x00, sizeof(*token) * max);
 
-	if (read_nextline) {
-		if (!fgets(line, MAX_LINE_LEN, fp))
-			goto out_eof;
-		line_pos = 0;
-		++line_num;
-		read_nextline = 0;
-	}
-	for (i = 0; i < max; i++) {
-		while (isspace(line[line_pos]))
-			++line_pos;
-		if (line[line_pos] == '\0' || line[line_pos] == '#' ||
-				line[line_pos] == ';') {
-			read_nextline = 1;
-			if (i >= min)
-				goto out_ok;
-			goto out_eol;
-		}
-		token[i] = line + line_pos;
-		c = line[line_pos];
-		if (c == '"' || c == '\'') {
-			token[i]++;
-			while (line[++line_pos] != c && line[line_pos])
-				/* NOTHING */;
-		} else {
-			for (/* NOTHING */; !isspace(line[line_pos]) &&
-					line[line_pos]; line_pos++)
-				/* NOTHING */;
-		}
-		if (!line[line_pos]) {
-			read_nextline = 1;
-			if (i >= min - 1)
-				goto out_ok;
-			goto out_eol;
-		}
-		line[line_pos] = '\0';
-		line_pos++;
-	}
+    if (read_nextline) {
+        if (!fgets(line, MAX_LINE_LEN, fp))
+            goto out_eof;
+        line_pos = 0;
+        ++line_num;
+        read_nextline = 0;
+    }
+    for (i = 0; i < max; i++) {
+        while (isspace(line[line_pos]))
+            ++line_pos;
+        if (line[line_pos] == '\0' || line[line_pos] == '#' ||
+            line[line_pos] == ';') {
+            read_nextline = 1;
+            if (i >= min)
+                goto out_ok;
+            goto out_eol;
+        }
+        token[i] = line + line_pos;
+        c = line[line_pos];
+        if (c == '"' || c == '\'') {
+            token[i]++;
+            while (line[++line_pos] != c && line[line_pos])
+                /* NOTHING */;
+        } else {
+            for (/* NOTHING */; !isspace(line[line_pos]) &&
+                                  line[line_pos]; line_pos++)
+                /* NOTHING */;
+        }
+        if (!line[line_pos]) {
+            read_nextline = 1;
+            if (i >= min - 1)
+                goto out_ok;
+            goto out_eol;
+        }
+        line[line_pos] = '\0';
+        line_pos++;
+    }
 out_ok:
-	return i;
+    return i;
 out_eof:
-	read_nextline = 1;
-	return RET_EOF;
+    read_nextline = 1;
+    return RET_EOF;
 out_eol:
-	return RET_EOL;
+    return RET_EOL;
 }
 
 static codecs_t *video_codecs=NULL;
@@ -526,398 +526,395 @@ static int nr_acodecs = 0;
 
 int parse_codec_cfg(const char *cfgfile)
 {
-	codecs_t *codec = NULL; // current codec
-	codecs_t **codecsp = NULL;// points to audio_codecs or to video_codecs
-	char *endptr;	// strtoul()...
-	int *nr_codecsp;
-	int codec_type;		/* TYPE_VIDEO/TYPE_AUDIO */
-	int tmp, i;
+    codecs_t *codec = NULL; // current codec
+    codecs_t **codecsp = NULL;// points to audio_codecs or to video_codecs
+    char *endptr;   // strtoul()...
+    int *nr_codecsp;
+    int codec_type;     /* TYPE_VIDEO/TYPE_AUDIO */
+    int tmp, i;
 
-	// in case we call it a second time
-	codecs_uninit_free();
+    // in case we call it a second time
+    codecs_uninit_free();
 
-	nr_vcodecs = 0;
-	nr_acodecs = 0;
+    nr_vcodecs = 0;
+    nr_acodecs = 0;
 
-	if(cfgfile==NULL) {
+    if(cfgfile==NULL) {
 #ifdef CODECS2HTML
-	  	return 0;
+        return 0;
 #else
-		video_codecs = builtin_video_codecs;
-		audio_codecs = builtin_audio_codecs;
-		nr_vcodecs = sizeof(builtin_video_codecs)/sizeof(codecs_t);
-		nr_acodecs = sizeof(builtin_audio_codecs)/sizeof(codecs_t);
-		return 1;
+        video_codecs = builtin_video_codecs;
+        audio_codecs = builtin_audio_codecs;
+        nr_vcodecs = sizeof(builtin_video_codecs)/sizeof(codecs_t);
+        nr_acodecs = sizeof(builtin_audio_codecs)/sizeof(codecs_t);
+        return 1;
 #endif
-	}
+    }
 
-	mp_msg(MSGT_CODECCFG,MSGL_V,MSGTR_ReadingFile, cfgfile);
+    mp_msg(MSGT_CODECCFG,MSGL_V,MSGTR_ReadingFile, cfgfile);
 
-	if ((fp = fopen(cfgfile, "r")) == NULL) {
-		mp_msg(MSGT_CODECCFG,MSGL_V,MSGTR_CantOpenFileError, cfgfile, strerror(errno));
-		return 0;
-	}
+    if ((fp = fopen(cfgfile, "r")) == NULL) {
+        mp_msg(MSGT_CODECCFG,MSGL_V,MSGTR_CantOpenFileError, cfgfile, strerror(errno));
+        return 0;
+    }
 
-	if ((line = malloc(MAX_LINE_LEN + 1)) == NULL) {
-		mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantGetMemoryForLine, strerror(errno));
-		return 0;
-	}
-	read_nextline = 1;
+    if ((line = malloc(MAX_LINE_LEN + 1)) == NULL) {
+        mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantGetMemoryForLine, strerror(errno));
+        return 0;
+    }
+    read_nextline = 1;
 
-	/*
-	 * this only catches release lines at the start of
-	 * codecs.conf, before audiocodecs and videocodecs.
-	 */
-	while ((tmp = get_token(1, 1)) == RET_EOL)
-		/* NOTHING */;
-	if (tmp == RET_EOF)
-		goto out;
-	if (!strcmp(token[0], "release")) {
-		if (get_token(1, 2) < 0)
-			goto err_out_parse_error;
-		tmp = atoi(token[0]);
-		if (tmp < CODEC_CFG_MIN)
-			goto err_out_release_num;
-		while ((tmp = get_token(1, 1)) == RET_EOL)
-			/* NOTHING */;
-		if (tmp == RET_EOF)
-			goto out;
-	} else
-		goto err_out_release_num;
+    /*
+     * this only catches release lines at the start of
+     * codecs.conf, before audiocodecs and videocodecs.
+     */
+    while ((tmp = get_token(1, 1)) == RET_EOL)
+        /* NOTHING */;
+    if (tmp == RET_EOF)
+        goto out;
+    if (!strcmp(token[0], "release")) {
+        if (get_token(1, 2) < 0)
+            goto err_out_parse_error;
+        tmp = atoi(token[0]);
+        if (tmp < CODEC_CFG_MIN)
+            goto err_out_release_num;
+        while ((tmp = get_token(1, 1)) == RET_EOL)
+            /* NOTHING */;
+        if (tmp == RET_EOF)
+            goto out;
+    } else
+        goto err_out_release_num;
 
-	/*
-	 * check if the next block starts with 'audiocodec' or
-	 * with 'videocodec'
-	 */
-	if (!strcmp(token[0], "audiocodec") || !strcmp(token[0], "videocodec"))
-		goto loop_enter;
-	goto err_out_parse_error;
+    /*
+     * check if the next block starts with 'audiocodec' or
+     * with 'videocodec'
+     */
+    if (!strcmp(token[0], "audiocodec") || !strcmp(token[0], "videocodec"))
+        goto loop_enter;
+    goto err_out_parse_error;
 
-	while ((tmp = get_token(1, 1)) != RET_EOF) {
-		if (tmp == RET_EOL)
-			continue;
-		if (!strcmp(token[0], "audiocodec") ||
-				!strcmp(token[0], "videocodec")) {
-			if (!validate_codec(codec, codec_type))
-				goto err_out_not_valid;
-		loop_enter:
-			if (*token[0] == 'v') {
-				codec_type = TYPE_VIDEO;
-				nr_codecsp = &nr_vcodecs;
-				codecsp = &video_codecs;
-			} else if (*token[0] == 'a') {
-				codec_type = TYPE_AUDIO;
-				nr_codecsp = &nr_acodecs;
-				codecsp = &audio_codecs;
+    while ((tmp = get_token(1, 1)) != RET_EOF) {
+        if (tmp == RET_EOL)
+            continue;
+        if (!strcmp(token[0], "audiocodec") ||
+            !strcmp(token[0], "videocodec")) {
+            if (!validate_codec(codec, codec_type))
+                goto err_out_not_valid;
+        loop_enter:
+            if (*token[0] == 'v') {
+                codec_type = TYPE_VIDEO;
+                nr_codecsp = &nr_vcodecs;
+                codecsp = &video_codecs;
+            } else if (*token[0] == 'a') {
+                codec_type = TYPE_AUDIO;
+                nr_codecsp = &nr_acodecs;
+                codecsp = &audio_codecs;
 #ifdef DEBUG
-			} else {
-				mp_msg(MSGT_CODECCFG,MSGL_ERR,"picsba\n");
-				goto err_out;
+            } else {
+                mp_msg(MSGT_CODECCFG,MSGL_ERR,"picsba\n");
+                goto err_out;
 #endif
-			}
-		        if (!(*codecsp = realloc(*codecsp,
-				sizeof(codecs_t) * (*nr_codecsp + 2)))) {
-			    mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantReallocCodecsp, strerror(errno));
-			    goto err_out;
-		        }
-			codec=*codecsp + *nr_codecsp;
-			++*nr_codecsp;
-                        memset(codec,0,sizeof(codecs_t));
-			memset(codec->fourcc, 0xff, sizeof(codec->fourcc));
-			memset(codec->outfmt, 0xff, sizeof(codec->outfmt));
-			memset(codec->infmt, 0xff, sizeof(codec->infmt));
+            }
+            if (!(*codecsp = realloc(*codecsp,
+                                     sizeof(codecs_t) * (*nr_codecsp + 2)))) {
+                mp_msg(MSGT_CODECCFG,MSGL_FATAL,MSGTR_CantReallocCodecsp, strerror(errno));
+                goto err_out;
+            }
+            codec=*codecsp + *nr_codecsp;
+            ++*nr_codecsp;
+            memset(codec,0,sizeof(codecs_t));
+            memset(codec->fourcc, 0xff, sizeof(codec->fourcc));
+            memset(codec->outfmt, 0xff, sizeof(codec->outfmt));
+            memset(codec->infmt, 0xff, sizeof(codec->infmt));
 
-			if (get_token(1, 1) < 0)
-				goto err_out_parse_error;
-			for (i = 0; i < *nr_codecsp - 1; i++) {
-				if(( (*codecsp)[i].name!=NULL) &&
-				    (!strcmp(token[0], (*codecsp)[i].name)) ) {
-					mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNameNotUnique, token[0]);
-					goto err_out_print_linenum;
-				}
-			}
-			if (!(codec->name = strdup(token[0]))) {
-				mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupName, strerror(errno));
-				goto err_out;
-			}
-		} else if (!strcmp(token[0], "info")) {
-			if (codec->info || get_token(1, 1) < 0)
-				goto err_out_parse_error;
-			if (!(codec->info = strdup(token[0]))) {
-				mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupInfo, strerror(errno));
-				goto err_out;
-			}
-		} else if (!strcmp(token[0], "comment")) {
-			if (get_token(1, 1) < 0)
-				goto err_out_parse_error;
-			add_comment(token[0], &codec->comment);
-		} else if (!strcmp(token[0], "fourcc")) {
-			if (get_token(1, 2) < 0)
-				goto err_out_parse_error;
-			if (!add_to_fourcc(token[0], token[1],
-						codec->fourcc,
-						codec->fourccmap))
-				goto err_out_print_linenum;
-		} else if (!strcmp(token[0], "format")) {
-			if (get_token(1, 2) < 0)
-				goto err_out_parse_error;
-			if (!add_to_format(token[0], token[1],
-					codec->fourcc,codec->fourccmap))
-				goto err_out_print_linenum;
-		} else if (!strcmp(token[0], "driver")) {
-			if (get_token(1, 1) < 0)
-				goto err_out_parse_error;
-			if (!(codec->drv = strdup(token[0]))) {
-				mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupDriver, strerror(errno));
-				goto err_out;
-			}
-		} else if (!strcmp(token[0], "dll")) {
-			if (get_token(1, 1) < 0)
-				goto err_out_parse_error;
-			if (!(codec->dll = strdup(token[0]))) {
-				mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupDLL, strerror(errno));
-				goto err_out;
-			}
-		} else if (!strcmp(token[0], "guid")) {
-			if (get_token(11, 11) < 0)
-				goto err_out_parse_error;
-                        codec->guid.f1=strtoul(token[0],&endptr,0);
-			if ((*endptr != ',' || *(endptr + 1) != '\0') &&
-					*endptr != '\0')
-				goto err_out_parse_error;
-                        codec->guid.f2=strtoul(token[1],&endptr,0);
-			if ((*endptr != ',' || *(endptr + 1) != '\0') &&
-					*endptr != '\0')
-				goto err_out_parse_error;
-                        codec->guid.f3=strtoul(token[2],&endptr,0);
-			if ((*endptr != ',' || *(endptr + 1) != '\0') &&
-					*endptr != '\0')
-				goto err_out_parse_error;
-			for (i = 0; i < 8; i++) {
-                            codec->guid.f4[i]=strtoul(token[i + 3],&endptr,0);
-				if ((*endptr != ',' || *(endptr + 1) != '\0') &&
-						*endptr != '\0')
-					goto err_out_parse_error;
-			}
-		} else if (!strcmp(token[0], "out")) {
-			if (get_token(1, 2) < 0)
-				goto err_out_parse_error;
-			if (!add_to_inout(token[0], token[1], codec->outfmt,
-						codec->outflags))
-				goto err_out_print_linenum;
-		} else if (!strcmp(token[0], "in")) {
-			if (get_token(1, 2) < 0)
-				goto err_out_parse_error;
-			if (!add_to_inout(token[0], token[1], codec->infmt,
-						codec->inflags))
-				goto err_out_print_linenum;
-		} else if (!strcmp(token[0], "flags")) {
-			if (get_token(1, 1) < 0)
-				goto err_out_parse_error;
-			if (!strcmp(token[0], "seekable"))
-				codec->flags |= CODECS_FLAG_SEEKABLE;
-			else
-			if (!strcmp(token[0], "align16"))
-				codec->flags |= CODECS_FLAG_ALIGN16;
-			else
-				goto err_out_parse_error;
-		} else if (!strcmp(token[0], "status")) {
-			if (get_token(1, 1) < 0)
-				goto err_out_parse_error;
-			if (!strcasecmp(token[0], "working"))
-				codec->status = CODECS_STATUS_WORKING;
-			else if (!strcasecmp(token[0], "crashing"))
-				codec->status = CODECS_STATUS_NOT_WORKING;
-			else if (!strcasecmp(token[0], "untested"))
-				codec->status = CODECS_STATUS_UNTESTED;
-			else if (!strcasecmp(token[0], "buggy"))
-				codec->status = CODECS_STATUS_PROBLEMS;
-			else
-				goto err_out_parse_error;
-		} else if (!strcmp(token[0], "cpuflags")) {
-			if (get_token(1, 1) < 0)
-				goto err_out_parse_error;
-			if (!(codec->cpuflags = get_cpuflags(token[0])))
-				goto err_out_parse_error;
-		} else
-			goto err_out_parse_error;
-	}
-	if (!validate_codec(codec, codec_type))
-		goto err_out_not_valid;
-	mp_msg(MSGT_CODECCFG,MSGL_INFO,MSGTR_AudioVideoCodecTotals, nr_acodecs, nr_vcodecs);
-	if(video_codecs) video_codecs[nr_vcodecs].name = NULL;
-	if(audio_codecs) audio_codecs[nr_acodecs].name = NULL;
+            if (get_token(1, 1) < 0)
+                goto err_out_parse_error;
+            for (i = 0; i < *nr_codecsp - 1; i++) {
+                if(( (*codecsp)[i].name!=NULL) &&
+                   (!strcmp(token[0], (*codecsp)[i].name)) ) {
+                    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecNameNotUnique, token[0]);
+                    goto err_out_print_linenum;
+                }
+            }
+            if (!(codec->name = strdup(token[0]))) {
+                mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupName, strerror(errno));
+                goto err_out;
+            }
+        } else if (!strcmp(token[0], "info")) {
+            if (codec->info || get_token(1, 1) < 0)
+                goto err_out_parse_error;
+            if (!(codec->info = strdup(token[0]))) {
+                mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupInfo, strerror(errno));
+                goto err_out;
+            }
+        } else if (!strcmp(token[0], "comment")) {
+            if (get_token(1, 1) < 0)
+                goto err_out_parse_error;
+            add_comment(token[0], &codec->comment);
+        } else if (!strcmp(token[0], "fourcc")) {
+            if (get_token(1, 2) < 0)
+                goto err_out_parse_error;
+            if (!add_to_fourcc(token[0], token[1],
+                               codec->fourcc,
+                               codec->fourccmap))
+                goto err_out_print_linenum;
+        } else if (!strcmp(token[0], "format")) {
+            if (get_token(1, 2) < 0)
+                goto err_out_parse_error;
+            if (!add_to_format(token[0], token[1],
+                               codec->fourcc,codec->fourccmap))
+                goto err_out_print_linenum;
+        } else if (!strcmp(token[0], "driver")) {
+            if (get_token(1, 1) < 0)
+                goto err_out_parse_error;
+            if (!(codec->drv = strdup(token[0]))) {
+                mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupDriver, strerror(errno));
+                goto err_out;
+            }
+        } else if (!strcmp(token[0], "dll")) {
+            if (get_token(1, 1) < 0)
+                goto err_out_parse_error;
+            if (!(codec->dll = strdup(token[0]))) {
+                mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CantStrdupDLL, strerror(errno));
+                goto err_out;
+            }
+        } else if (!strcmp(token[0], "guid")) {
+            if (get_token(11, 11) < 0)
+                goto err_out_parse_error;
+            codec->guid.f1=strtoul(token[0],&endptr,0);
+            if ((*endptr != ',' || *(endptr + 1) != '\0') &&
+                *endptr != '\0')
+                goto err_out_parse_error;
+            codec->guid.f2=strtoul(token[1],&endptr,0);
+            if ((*endptr != ',' || *(endptr + 1) != '\0') &&
+                *endptr != '\0')
+                goto err_out_parse_error;
+            codec->guid.f3=strtoul(token[2],&endptr,0);
+            if ((*endptr != ',' || *(endptr + 1) != '\0') &&
+                *endptr != '\0')
+                goto err_out_parse_error;
+            for (i = 0; i < 8; i++) {
+                codec->guid.f4[i]=strtoul(token[i + 3],&endptr,0);
+                if ((*endptr != ',' || *(endptr + 1) != '\0') &&
+                    *endptr != '\0')
+                    goto err_out_parse_error;
+            }
+        } else if (!strcmp(token[0], "out")) {
+            if (get_token(1, 2) < 0)
+                goto err_out_parse_error;
+            if (!add_to_inout(token[0], token[1], codec->outfmt,
+                              codec->outflags))
+                goto err_out_print_linenum;
+        } else if (!strcmp(token[0], "in")) {
+            if (get_token(1, 2) < 0)
+                goto err_out_parse_error;
+            if (!add_to_inout(token[0], token[1], codec->infmt,
+                              codec->inflags))
+                goto err_out_print_linenum;
+        } else if (!strcmp(token[0], "flags")) {
+            if (get_token(1, 1) < 0)
+                goto err_out_parse_error;
+            if (!strcmp(token[0], "seekable"))
+                codec->flags |= CODECS_FLAG_SEEKABLE;
+            else
+            if (!strcmp(token[0], "align16"))
+                codec->flags |= CODECS_FLAG_ALIGN16;
+            else
+                goto err_out_parse_error;
+        } else if (!strcmp(token[0], "status")) {
+            if (get_token(1, 1) < 0)
+                goto err_out_parse_error;
+            if (!strcasecmp(token[0], "working"))
+                codec->status = CODECS_STATUS_WORKING;
+            else if (!strcasecmp(token[0], "crashing"))
+                codec->status = CODECS_STATUS_NOT_WORKING;
+            else if (!strcasecmp(token[0], "untested"))
+                codec->status = CODECS_STATUS_UNTESTED;
+            else if (!strcasecmp(token[0], "buggy"))
+                codec->status = CODECS_STATUS_PROBLEMS;
+            else
+                goto err_out_parse_error;
+        } else if (!strcmp(token[0], "cpuflags")) {
+            if (get_token(1, 1) < 0)
+                goto err_out_parse_error;
+            if (!(codec->cpuflags = get_cpuflags(token[0])))
+                goto err_out_parse_error;
+        } else
+            goto err_out_parse_error;
+    }
+    if (!validate_codec(codec, codec_type))
+        goto err_out_not_valid;
+    mp_msg(MSGT_CODECCFG,MSGL_INFO,MSGTR_AudioVideoCodecTotals, nr_acodecs, nr_vcodecs);
+    if(video_codecs) video_codecs[nr_vcodecs].name = NULL;
+    if(audio_codecs) audio_codecs[nr_acodecs].name = NULL;
 out:
-	free(line);
-	line=NULL;
-	fclose(fp);
-	return 1;
+    free(line);
+    line=NULL;
+    fclose(fp);
+    return 1;
 
 err_out_parse_error:
-	mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
+    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_ParseError);
 err_out_print_linenum:
-	PRINT_LINENUM;
+    PRINT_LINENUM;
 err_out:
-	codecs_uninit_free();
+    codecs_uninit_free();
 
-	free(line);
-	line=NULL;
-	line_num = 0;
-	fclose(fp);
-	return 0;
+    free(line);
+    line=NULL;
+    line_num = 0;
+    fclose(fp);
+    return 0;
 err_out_not_valid:
-	mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecDefinitionIncorrect);
-	goto err_out_print_linenum;
+    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_CodecDefinitionIncorrect);
+    goto err_out_print_linenum;
 err_out_release_num:
-	mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_OutdatedCodecsConf);
-	goto err_out_print_linenum;
+    mp_msg(MSGT_CODECCFG,MSGL_ERR,MSGTR_OutdatedCodecsConf);
+    goto err_out_print_linenum;
 }
 
 static void codecs_free(codecs_t* codecs,int count) {
-	int i;
-		for ( i = 0; i < count; i++)
-			if ( codecs[i].name ) {
-				if( codecs[i].name )
-					free(codecs[i].name);
-				if( codecs[i].info )
-					free(codecs[i].info);
-				if( codecs[i].comment )
-					free(codecs[i].comment);
-				if( codecs[i].dll )
-					free(codecs[i].dll);
-				if( codecs[i].drv )
-					free(codecs[i].drv);
-			}
-		if (codecs)
-			free(codecs);
+    int i;
+    for ( i = 0; i < count; i++)
+        if ( codecs[i].name ) {
+            if( codecs[i].name )
+                free(codecs[i].name);
+            if( codecs[i].info )
+                free(codecs[i].info);
+            if( codecs[i].comment )
+                free(codecs[i].comment);
+            if( codecs[i].dll )
+                free(codecs[i].dll);
+            if( codecs[i].drv )
+                free(codecs[i].drv);
+        }
+    if (codecs)
+        free(codecs);
 }
 
 void codecs_uninit_free(void) {
-	if (video_codecs)
-	codecs_free(video_codecs,nr_vcodecs);
-	video_codecs=NULL;
-	if (audio_codecs)
-	codecs_free(audio_codecs,nr_acodecs);
-	audio_codecs=NULL;
+    if (video_codecs)
+    codecs_free(video_codecs,nr_vcodecs);
+    video_codecs=NULL;
+    if (audio_codecs)
+    codecs_free(audio_codecs,nr_acodecs);
+    audio_codecs=NULL;
 }
 
 codecs_t *find_audio_codec(unsigned int fourcc, unsigned int *fourccmap,
-		codecs_t *start, int force)
+                           codecs_t *start, int force)
 {
-	return find_codec(fourcc, fourccmap, start, 1, force);
+    return find_codec(fourcc, fourccmap, start, 1, force);
 }
 
 codecs_t *find_video_codec(unsigned int fourcc, unsigned int *fourccmap,
-		codecs_t *start, int force)
+                           codecs_t *start, int force)
 {
-	return find_codec(fourcc, fourccmap, start, 0, force);
+    return find_codec(fourcc, fourccmap, start, 0, force);
 }
 
 codecs_t* find_codec(unsigned int fourcc,unsigned int *fourccmap,
-		codecs_t *start, int audioflag, int force)
+                     codecs_t *start, int audioflag, int force)
 {
-	int i, j;
-	codecs_t *c;
+    int i, j;
+    codecs_t *c;
 
 #if 0
-	if (start) {
-		for (/* NOTHING */; start->name; start++) {
-			for (j = 0; j < CODECS_MAX_FOURCC; j++) {
-				if (start->fourcc[j] == fourcc) {
-					if (fourccmap)
-						*fourccmap = start->fourccmap[j];
-					return start;
-				}
-			}
-		}
-	} else
+    if (start) {
+        for (/* NOTHING */; start->name; start++) {
+            for (j = 0; j < CODECS_MAX_FOURCC; j++) {
+                if (start->fourcc[j] == fourcc) {
+                    if (fourccmap)
+                        *fourccmap = start->fourccmap[j];
+                    return start;
+                }
+            }
+        }
+    } else
 #endif
-        {
-		if (audioflag) {
-			i = nr_acodecs;
-			c = audio_codecs;
-		} else {
-			i = nr_vcodecs;
-			c = video_codecs;
-		}
-		if(!i) return NULL;
-		for (/* NOTHING */; i--; c++) {
-                        if(start && c<=start) continue;
-			for (j = 0; j < CODECS_MAX_FOURCC; j++) {
-				// FIXME: do NOT hardwire 'null' name here:
-				if (c->fourcc[j]==fourcc || !strcmp(c->drv,"null")) {
-					if (fourccmap)
-						*fourccmap = c->fourccmap[j];
-					return c;
-				}
-			}
-			if (force) return c;
-		}
-	}
-	return NULL;
+    {
+        if (audioflag) {
+            i = nr_acodecs;
+            c = audio_codecs;
+        } else {
+            i = nr_vcodecs;
+            c = video_codecs;
+        }
+        if(!i) return NULL;
+        for (/* NOTHING */; i--; c++) {
+            if(start && c<=start) continue;
+            for (j = 0; j < CODECS_MAX_FOURCC; j++) {
+                // FIXME: do NOT hardwire 'null' name here:
+                if (c->fourcc[j]==fourcc || !strcmp(c->drv,"null")) {
+                    if (fourccmap)
+                        *fourccmap = c->fourccmap[j];
+                    return c;
+                }
+            }
+            if (force) return c;
+        }
+    }
+    return NULL;
 }
 
 void stringset_init(stringset_t *set) {
-  *set = calloc(1, sizeof(char *));
+    *set = calloc(1, sizeof(char *));
 }
 
 void stringset_free(stringset_t *set) {
-  int count = 0;
-  while ((*set)[count]) free((*set)[count++]);
-  free(*set);
-  *set = NULL;
+    int count = 0;
+    while ((*set)[count]) free((*set)[count++]);
+    free(*set);
+    *set = NULL;
 }
 
 void stringset_add(stringset_t *set, const char *str) {
-  int count = 0;
-  while ((*set)[count]) count++;
-  count++;
-  *set = realloc(*set, sizeof(char *) * (count + 1));
-  (*set)[count - 1] = strdup(str);
-  (*set)[count] = NULL;
+    int count = 0;
+    while ((*set)[count]) count++;
+    count++;
+    *set = realloc(*set, sizeof(char *) * (count + 1));
+    (*set)[count - 1] = strdup(str);
+    (*set)[count] = NULL;
 }
 
 int stringset_test(stringset_t *set, const char *str) {
-  stringset_t s;
-  for (s = *set; *s; s++)
-    if (strcmp(*s, str) == 0)
-      return 1;
-  return 0;
+    stringset_t s;
+    for (s = *set; *s; s++)
+        if (strcmp(*s, str) == 0)
+            return 1;
+    return 0;
 }
 
 void list_codecs(int audioflag){
-	int i;
-	codecs_t *c;
-
-		if (audioflag) {
-			i = nr_acodecs;
-			c = audio_codecs;
-			mp_msg(MSGT_CODECCFG,MSGL_INFO,"ac:         afm:      status:   info:  [lib/dll]\n");
-		} else {
-			i = nr_vcodecs;
-			c = video_codecs;
-			mp_msg(MSGT_CODECCFG,MSGL_INFO,"vc:         vfm:      status:   info:  [lib/dll]\n");
-		}
-		if(!i) return;
-		for (/* NOTHING */; i--; c++) {
-			char* s="unknown ";
-			switch(c->status){
-			  case CODECS_STATUS_WORKING:     s="working ";break;
-			  case CODECS_STATUS_PROBLEMS:    s="problems";break;
-			  case CODECS_STATUS_NOT_WORKING: s="crashing";break;
-			  case CODECS_STATUS_UNTESTED:    s="untested";break;
-			}
-			if(c->dll)
-			  mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s %-9s %s  %s  [%s]\n",c->name,c->drv,s,c->info,c->dll);
-			else
-			  mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s %-9s %s  %s\n",c->name,c->drv,s,c->info);
-
-		}
+    int i;
+    codecs_t *c;
 
+    if (audioflag) {
+        i = nr_acodecs;
+        c = audio_codecs;
+        mp_msg(MSGT_CODECCFG,MSGL_INFO,"ac:     afm:      status:   info:  [lib/dll]\n");
+    } else {
+        i = nr_vcodecs;
+        c = video_codecs;
+        mp_msg(MSGT_CODECCFG,MSGL_INFO,"vc:     vfm:      status:   info:  [lib/dll]\n");
+    }
+    if(!i) return;
+    for (/* NOTHING */; i--; c++) {
+        char* s="unknown ";
+        switch(c->status){
+        case CODECS_STATUS_WORKING:     s="working ";break;
+        case CODECS_STATUS_PROBLEMS:    s="problems";break;
+        case CODECS_STATUS_NOT_WORKING: s="crashing";break;
+        case CODECS_STATUS_UNTESTED:    s="untested";break;
+        }
+        if(c->dll)
+            mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s %-9s %s  %s  [%s]\n",c->name,c->drv,s,c->info,c->dll);
+        else
+            mp_msg(MSGT_CODECCFG,MSGL_INFO,"%-11s %-9s %s  %s\n",c->name,c->drv,s,c->info);
+        }
 }
 
 
-
 #ifdef CODECS2HTML
 void wrapline(FILE *f2,char *s){
     int c;
@@ -931,251 +928,250 @@ void wrapline(FILE *f2,char *s){
 }
 
 void parsehtml(FILE *f1,FILE *f2,codecs_t *codec,int section,int dshow){
-        int c,d;
-        while((c=fgetc(f1))>=0){
-            if(c!='%'){
-                fputc(c,f2);
-                continue;
-            }
-            d=fgetc(f1);
-
-            switch(d){
-            case '.':
-                return; // end of section
-            case 'n':
-                wrapline(f2,codec->name); break;
-            case 'i':
-                wrapline(f2,codec->info); break;
-            case 'c':
-                wrapline(f2,codec->comment); break;
-            case 'd':
-                wrapline(f2,codec->dll); break;
-            case 'D':
-                fprintf(f2,"%c",!strcmp(codec->drv,"dshow")?'+':'-'); break;
-            case 'F':
-                for(d=0;d<CODECS_MAX_FOURCC;d++)
-                    if(!d || codec->fourcc[d]!=0xFFFFFFFF)
-                        fprintf(f2,"%s%.4s",d?"<br>":"",(codec->fourcc[d]==0xFFFFFFFF || codec->fourcc[d]<0x20202020)?!d?"-":"":(char*) &codec->fourcc[d]);
-                break;
-            case 'f':
-                for(d=0;d<CODECS_MAX_FOURCC;d++)
-                    if(codec->fourcc[d]!=0xFFFFFFFF)
-                        fprintf(f2,"%s0x%X",d?"<br>":"",codec->fourcc[d]);
-                break;
-            case 'Y':
-                for(d=0;d<CODECS_MAX_OUTFMT;d++)
-                    if(codec->outfmt[d]!=0xFFFFFFFF){
-		        for (c=0; fmt_table[c].name; c++)
-                            if(fmt_table[c].num==codec->outfmt[d]) break;
-                        if(fmt_table[c].name)
-                            fprintf(f2,"%s%s",d?"<br>":"",fmt_table[c].name);
-                    }
-                break;
-            default:
-                fputc(c,f2);
-                fputc(d,f2);
-            }
+    int c,d;
+    while((c=fgetc(f1))>=0){
+        if(c!='%'){
+            fputc(c,f2);
+            continue;
         }
+        d=fgetc(f1);
 
+        switch(d){
+        case '.':
+        return; // end of section
+        case 'n':
+            wrapline(f2,codec->name); break;
+        case 'i':
+            wrapline(f2,codec->info); break;
+        case 'c':
+            wrapline(f2,codec->comment); break;
+        case 'd':
+            wrapline(f2,codec->dll); break;
+        case 'D':
+            fprintf(f2,"%c",!strcmp(codec->drv,"dshow")?'+':'-'); break;
+        case 'F':
+            for(d=0;d<CODECS_MAX_FOURCC;d++)
+                if(!d || codec->fourcc[d]!=0xFFFFFFFF)
+                    fprintf(f2,"%s%.4s",d?"<br>":"",(codec->fourcc[d]==0xFFFFFFFF || codec->fourcc[d]<0x20202020)?!d?"-":"":(char*) &codec->fourcc[d]);
+            break;
+        case 'f':
+            for(d=0;d<CODECS_MAX_FOURCC;d++)
+                if(codec->fourcc[d]!=0xFFFFFFFF)
+                    fprintf(f2,"%s0x%X",d?"<br>":"",codec->fourcc[d]);
+            break;
+        case 'Y':
+            for(d=0;d<CODECS_MAX_OUTFMT;d++)
+                if(codec->outfmt[d]!=0xFFFFFFFF){
+                    for (c=0; fmt_table[c].name; c++)
+                        if(fmt_table[c].num==codec->outfmt[d]) break;
+                    if(fmt_table[c].name)
+                        fprintf(f2,"%s%s",d?"<br>":"",fmt_table[c].name);
+                }
+            break;
+        default:
+            fputc(c,f2);
+            fputc(d,f2);
+        }
+    }
 }
 
 void skiphtml(FILE *f1){
-        int c,d;
-        while((c=fgetc(f1))>=0){
-            if(c!='%'){
-                continue;
-            }
-            d=fgetc(f1);
-            if(d=='.') return; // end of section
+    int c,d;
+    while((c=fgetc(f1))>=0){
+        if(c!='%'){
+            continue;
         }
+        d=fgetc(f1);
+        if(d=='.') return; // end of section
+    }
 }
 
 static void print_int_array(const unsigned int* a, int size)
 {
-	printf("{ ");
-	while (size--)
-	    if(abs(*a)<256)
-		printf("%d%s", *a++, size?", ":"");
-	    else
-		printf("0x%X%s", *a++, size?", ":"");
-	printf(" }");
+    printf("{ ");
+    while (size--)
+        if(abs(*a)<256)
+            printf("%d%s", *a++, size?", ":"");
+        else
+            printf("0x%X%s", *a++, size?", ":"");
+    printf(" }");
 }
 
 static void print_char_array(const unsigned char* a, int size)
 {
-	printf("{ ");
-	while (size--)
-	    if((*a)<10)
-		printf("%d%s", *a++, size?", ":"");
-	    else
-		printf("0x%02x%s", *a++, size?", ":"");
-	printf(" }");
+    printf("{ ");
+    while (size--)
+        if((*a)<10)
+            printf("%d%s", *a++, size?", ":"");
+        else
+            printf("0x%02x%s", *a++, size?", ":"");
+    printf(" }");
 }
 
 static void print_string(const char* s)
 {
-	if (!s) printf("NULL");
-	else printf("\"%s\"", s);
+    if (!s) printf("NULL");
+    else printf("\"%s\"", s);
 }
 
 int main(int argc, char* argv[])
 {
-	codecs_t *cl;
-        FILE *f1;
-        FILE *f2;
-        int c,d,i;
-        int pos;
-        int section=-1;
-        int nr_codecs;
-        int win32=-1;
-        int dshow=-1;
-        int win32ex=-1;
+    codecs_t *cl;
+    FILE *f1;
+    FILE *f2;
+    int c,d,i;
+    int pos;
+    int section=-1;
+    int nr_codecs;
+    int win32=-1;
+    int dshow=-1;
+    int win32ex=-1;
 
-	/*
-	 * Take path to codecs.conf from command line, or fall back on
-	 * etc/codecs.conf
-	 */
-	if (!(nr_codecs = parse_codec_cfg((argc>1)?argv[1]:"etc/codecs.conf")))
-		exit(1);
+    /*
+     * Take path to codecs.conf from command line, or fall back on
+     * etc/codecs.conf
+     */
+    if (!(nr_codecs = parse_codec_cfg((argc>1)?argv[1]:"etc/codecs.conf")))
+        exit(1);
 
-	if (argc > 1) {
-		int i, j;
-		const char* nm[2];
-		codecs_t* cod[2];
-		int nr[2];
+    if (argc > 1) {
+        int i, j;
+        const char* nm[2];
+        codecs_t* cod[2];
+        int nr[2];
 
-		nm[0] = "builtin_video_codecs";
-		cod[0] = video_codecs;
-		nr[0] = nr_vcodecs;
+        nm[0] = "builtin_video_codecs";
+        cod[0] = video_codecs;
+        nr[0] = nr_vcodecs;
 
-		nm[1] = "builtin_audio_codecs";
-		cod[1] = audio_codecs;
-		nr[1] = nr_acodecs;
+        nm[1] = "builtin_audio_codecs";
+        cod[1] = audio_codecs;
+        nr[1] = nr_acodecs;
 
-		printf("/* GENERATED FROM %s, DO NOT EDIT! */\n\n",argv[1]);
-		printf("#include <stddef.h>\n",argv[1]);
-		printf("#include \"codec-cfg.h\"\n\n",argv[1]);
+        printf("/* GENERATED FROM %s, DO NOT EDIT! */\n\n",argv[1]);
+        printf("#include <stddef.h>\n",argv[1]);
+        printf("#include \"codec-cfg.h\"\n\n",argv[1]);
 
-		for (i=0; i<2; i++) {
-		  	printf("const codecs_t %s[] = {\n", nm[i]);
-			for (j = 0; j < nr[i]; j++) {
-			  	printf("{");
+        for (i=0; i<2; i++) {
+            printf("const codecs_t %s[] = {\n", nm[i]);
+            for (j = 0; j < nr[i]; j++) {
+                printf("{");
 
-				print_int_array(cod[i][j].fourcc, CODECS_MAX_FOURCC);
-				printf(", /* fourcc */\n");
+                print_int_array(cod[i][j].fourcc, CODECS_MAX_FOURCC);
+                printf(", /* fourcc */\n");
 
-				print_int_array(cod[i][j].fourccmap, CODECS_MAX_FOURCC);
-				printf(", /* fourccmap */\n");
+                print_int_array(cod[i][j].fourccmap, CODECS_MAX_FOURCC);
+                printf(", /* fourccmap */\n");
 
-				print_int_array(cod[i][j].outfmt, CODECS_MAX_OUTFMT);
-				printf(", /* outfmt */\n");
+                print_int_array(cod[i][j].outfmt, CODECS_MAX_OUTFMT);
+                printf(", /* outfmt */\n");
 
-				print_char_array(cod[i][j].outflags, CODECS_MAX_OUTFMT);
-				printf(", /* outflags */\n");
+                print_char_array(cod[i][j].outflags, CODECS_MAX_OUTFMT);
+                printf(", /* outflags */\n");
 
-				print_int_array(cod[i][j].infmt, CODECS_MAX_INFMT);
-				printf(", /* infmt */\n");
+                print_int_array(cod[i][j].infmt, CODECS_MAX_INFMT);
+                printf(", /* infmt */\n");
 
-				print_char_array(cod[i][j].inflags, CODECS_MAX_INFMT);
-				printf(", /* inflags */\n");
+                print_char_array(cod[i][j].inflags, CODECS_MAX_INFMT);
+                printf(", /* inflags */\n");
 
-				print_string(cod[i][j].name);    printf(", /* name */\n");
-				print_string(cod[i][j].info);    printf(", /* info */\n");
-				print_string(cod[i][j].comment); printf(", /* comment */\n");
-				print_string(cod[i][j].dll);     printf(", /* dll */\n");
-				print_string(cod[i][j].drv);     printf(", /* drv */\n");
+                print_string(cod[i][j].name);    printf(", /* name */\n");
+                print_string(cod[i][j].info);    printf(", /* info */\n");
+                print_string(cod[i][j].comment); printf(", /* comment */\n");
+                print_string(cod[i][j].dll);     printf(", /* dll */\n");
+                print_string(cod[i][j].drv);     printf(", /* drv */\n");
 
-				printf("{ 0x%08lx, %hu, %hu,",
-				       cod[i][j].guid.f1,
-				       cod[i][j].guid.f2,
-				       cod[i][j].guid.f3);
-				print_char_array(cod[i][j].guid.f4, sizeof(cod[i][j].guid.f4));
-				printf(" }, /* GUID */\n");
-				printf("%hd /* flags */, %hd /* status */, %hd /* cpuflags */ }\n",
-				       cod[i][j].flags,
-				       cod[i][j].status,
-				       cod[i][j].cpuflags);
-				if (j < nr[i]) printf(",\n");
-			}
-			printf("};\n\n");
-		}
-		exit(0);
-	}
+                printf("{ 0x%08lx, %hu, %hu,",
+                       cod[i][j].guid.f1,
+                       cod[i][j].guid.f2,
+                       cod[i][j].guid.f3);
+                print_char_array(cod[i][j].guid.f4, sizeof(cod[i][j].guid.f4));
+                printf(" }, /* GUID */\n");
+                printf("%hd /* flags */, %hd /* status */, %hd /* cpuflags */ }\n",
+                       cod[i][j].flags,
+                       cod[i][j].status,
+                       cod[i][j].cpuflags);
+                if (j < nr[i]) printf(",\n");
+            }
+            printf("};\n\n");
+        }
+        exit(0);
+    }
 
-        f1=fopen("DOCS/tech/codecs-in.html","rb"); if(!f1) exit(1);
-        f2=fopen("DOCS/codecs-status.html","wb"); if(!f2) exit(1);
+    f1=fopen("DOCS/tech/codecs-in.html","rb"); if(!f1) exit(1);
+    f2=fopen("DOCS/codecs-status.html","wb"); if(!f2) exit(1);
 
-        while((c=fgetc(f1))>=0){
-            if(c!='%'){
-                fputc(c,f2);
-                continue;
+    while((c=fgetc(f1))>=0){
+        if(c!='%'){
+            fputc(c,f2);
+            continue;
+        }
+        d=fgetc(f1);
+        if(d>='0' && d<='9'){
+            // begin section
+            section=d-'0';
+            //printf("BEGIN %d\n",section);
+            if(section>=5){
+                // audio
+                cl = audio_codecs;
+                nr_codecs = nr_acodecs;
+                dshow=7;win32=4;
+            } else {
+                // video
+                cl = video_codecs;
+                nr_codecs = nr_vcodecs;
+                dshow=4;win32=2;win32ex=6;
             }
-            d=fgetc(f1);
-            if(d>='0' && d<='9'){
-                // begin section
-                section=d-'0';
-                //printf("BEGIN %d\n",section);
-                if(section>=5){
-                    // audio
-		    cl = audio_codecs;
-		    nr_codecs = nr_acodecs;
-                    dshow=7;win32=4;
-                } else {
-                    // video
-		    cl = video_codecs;
-		    nr_codecs = nr_vcodecs;
-                    dshow=4;win32=2;win32ex=6;
-                }
-                pos=ftell(f1);
-                for(i=0;i<nr_codecs;i++){
-                    fseek(f1,pos,SEEK_SET);
-                    switch(section){
-                    case 0:
-                    case 5:
-                        if(cl[i].status==CODECS_STATUS_WORKING)
-//                            if(!(!strcmp(cl[i].drv,"vfw") || !strcmp(cl[i].drv,"dshow") || !strcmp(cl[i].drv,"vfwex") || !strcmp(cl[i].drv,"acm")))
-                                parsehtml(f1,f2,&cl[i],section,dshow);
-                        break;
+            pos=ftell(f1);
+            for(i=0;i<nr_codecs;i++){
+                fseek(f1,pos,SEEK_SET);
+                switch(section){
+                case 0:
+                case 5:
+                    if(cl[i].status==CODECS_STATUS_WORKING)
+//                if(!(!strcmp(cl[i].drv,"vfw") || !strcmp(cl[i].drv,"dshow") || !strcmp(cl[i].drv,"vfwex") || !strcmp(cl[i].drv,"acm")))
+                        parsehtml(f1,f2,&cl[i],section,dshow);
+                    break;
 #if 0
-                    case 1:
-                    case 6:
-                        if(cl[i].status==CODECS_STATUS_WORKING)
-                            if((!strcmp(cl[i].drv,"vfw") || !strcmp(cl[i].drv,"dshow") || !strcmp(cl[i].drv,"vfwex") || !strcmp(cl[i].drv,"acm")))
-                                parsehtml(f1,f2,&cl[i],section,dshow);
-                        break;
-#endif
-                    case 2:
-                    case 7:
-                        if(cl[i].status==CODECS_STATUS_PROBLEMS)
-                            parsehtml(f1,f2,&cl[i],section,dshow);
-                        break;
-                    case 3:
-                    case 8:
-                        if(cl[i].status==CODECS_STATUS_NOT_WORKING)
-                            parsehtml(f1,f2,&cl[i],section,dshow);
-                        break;
-                    case 4:
-                    case 9:
-                        if(cl[i].status==CODECS_STATUS_UNTESTED)
+                case 1:
+                case 6:
+                    if(cl[i].status==CODECS_STATUS_WORKING)
+                        if((!strcmp(cl[i].drv,"vfw") || !strcmp(cl[i].drv,"dshow") || !strcmp(cl[i].drv,"vfwex") || !strcmp(cl[i].drv,"acm")))
                             parsehtml(f1,f2,&cl[i],section,dshow);
-                        break;
-                    default:
-                        printf("Warning! unimplemented section: %d\n",section);
-                    }
+                    break;
+#endif
+                case 2:
+                case 7:
+                    if(cl[i].status==CODECS_STATUS_PROBLEMS)
+                        parsehtml(f1,f2,&cl[i],section,dshow);
+                    break;
+                case 3:
+                case 8:
+                    if(cl[i].status==CODECS_STATUS_NOT_WORKING)
+                        parsehtml(f1,f2,&cl[i],section,dshow);
+                    break;
+                case 4:
+                case 9:
+                    if(cl[i].status==CODECS_STATUS_UNTESTED)
+                        parsehtml(f1,f2,&cl[i],section,dshow);
+                    break;
+                default:
+                    printf("Warning! unimplemented section: %d\n",section);
                 }
-                fseek(f1,pos,SEEK_SET);
-                skiphtml(f1);
+            }
+            fseek(f1,pos,SEEK_SET);
+            skiphtml(f1);
 //void parsehtml(FILE *f1,FILE *f2,codecs_t *codec,int section,int dshow){
 
-                continue;
-            }
-            fputc(c,f2);
-            fputc(d,f2);
+            continue;
         }
+        fputc(c,f2);
+        fputc(d,f2);
+    }
 
-        fclose(f2);
-        fclose(f1);
-	return 0;
+    fclose(f2);
+    fclose(f1);
+    return 0;
 }
 
 #endif
@@ -1183,69 +1179,69 @@ int main(int argc, char* argv[])
 #ifdef TESTING
 int main(void)
 {
-	codecs_t *c;
-        int i,j, nr_codecs, state;
+    codecs_t *c;
+    int i,j, nr_codecs, state;
 
-	if (!(parse_codec_cfg("etc/codecs.conf")))
-		return 0;
-	if (!video_codecs)
-		printf("no videoconfig.\n");
-	if (!audio_codecs)
-		printf("no audioconfig.\n");
+    if (!(parse_codec_cfg("etc/codecs.conf")))
+        return 0;
+    if (!video_codecs)
+        printf("no videoconfig.\n");
+    if (!audio_codecs)
+        printf("no audioconfig.\n");
 
-	printf("videocodecs:\n");
-	c = video_codecs;
-	nr_codecs = nr_vcodecs;
-	state = 0;
+    printf("videocodecs:\n");
+    c = video_codecs;
+    nr_codecs = nr_vcodecs;
+    state = 0;
 next:
-	if (c) {
-		printf("number of %scodecs: %d\n", state==0?"video":"audio",
-		    nr_codecs);
-		for(i=0;i<nr_codecs;i++, c++){
-		    printf("\n============== %scodec %02d ===============\n",
-			state==0?"video":"audio",i);
-		    printf("name='%s'\n",c->name);
-		    printf("info='%s'\n",c->info);
-		    printf("comment='%s'\n",c->comment);
-		    printf("dll='%s'\n",c->dll);
-		    /* printf("flags=%X  driver=%d status=%d cpuflags=%d\n",
-		              c->flags, c->driver, c->status, c->cpuflags); */
-		    printf("flags=%X status=%d cpuflags=%d\n",
-				    c->flags, c->status, c->cpuflags);
+    if (c) {
+        printf("number of %scodecs: %d\n", state==0?"video":"audio",
+               nr_codecs);
+        for(i=0;i<nr_codecs;i++, c++){
+            printf("\n============== %scodec %02d ===============\n",
+                   state==0?"video":"audio",i);
+            printf("name='%s'\n",c->name);
+            printf("info='%s'\n",c->info);
+            printf("comment='%s'\n",c->comment);
+            printf("dll='%s'\n",c->dll);
+            /* printf("flags=%X  driver=%d status=%d cpuflags=%d\n",
+                      c->flags, c->driver, c->status, c->cpuflags); */
+            printf("flags=%X status=%d cpuflags=%d\n",
+                   c->flags, c->status, c->cpuflags);
 
-		    for(j=0;j<CODECS_MAX_FOURCC;j++){
-		      if(c->fourcc[j]!=0xFFFFFFFF){
-			  printf("fourcc %02d:  %08X (%.4s) ===> %08X (%.4s)\n",j,c->fourcc[j],(char *) &c->fourcc[j],c->fourccmap[j],(char *) &c->fourccmap[j]);
-		      }
-		    }
+            for(j=0;j<CODECS_MAX_FOURCC;j++){
+                if(c->fourcc[j]!=0xFFFFFFFF){
+                    printf("fourcc %02d:  %08X (%.4s) ===> %08X (%.4s)\n",j,c->fourcc[j],(char *) &c->fourcc[j],c->fourccmap[j],(char *) &c->fourccmap[j]);
+                }
+            }
 
-		    for(j=0;j<CODECS_MAX_OUTFMT;j++){
-		      if(c->outfmt[j]!=0xFFFFFFFF){
-			  printf("outfmt %02d:  %08X (%.4s)  flags: %d\n",j,c->outfmt[j],(char *) &c->outfmt[j],c->outflags[j]);
-		      }
-		    }
+            for(j=0;j<CODECS_MAX_OUTFMT;j++){
+                if(c->outfmt[j]!=0xFFFFFFFF){
+                    printf("outfmt %02d:  %08X (%.4s)  flags: %d\n",j,c->outfmt[j],(char *) &c->outfmt[j],c->outflags[j]);
+                }
+            }
 
-		    for(j=0;j<CODECS_MAX_INFMT;j++){
-		      if(c->infmt[j]!=0xFFFFFFFF){
-			  printf("infmt %02d:  %08X (%.4s)  flags: %d\n",j,c->infmt[j],(char *) &c->infmt[j],c->inflags[j]);
-		      }
-		    }
+            for(j=0;j<CODECS_MAX_INFMT;j++){
+                if(c->infmt[j]!=0xFFFFFFFF){
+                    printf("infmt %02d:  %08X (%.4s)  flags: %d\n",j,c->infmt[j],(char *) &c->infmt[j],c->inflags[j]);
+                }
+            }
 
-		    printf("GUID: %08lX %04X %04X",c->guid.f1,c->guid.f2,c->guid.f3);
-		    for(j=0;j<8;j++) printf(" %02X",c->guid.f4[j]);
-		    printf("\n");
+            printf("GUID: %08lX %04X %04X",c->guid.f1,c->guid.f2,c->guid.f3);
+            for(j=0;j<8;j++) printf(" %02X",c->guid.f4[j]);
+            printf("\n");
 
 
-		}
-	}
-	if (!state) {
-		printf("audiocodecs:\n");
-		c = audio_codecs;
-		nr_codecs = nr_acodecs;
-		state = 1;
-		goto next;
-	}
-	return 0;
+        }
+    }
+    if (!state) {
+        printf("audiocodecs:\n");
+        c = audio_codecs;
+        nr_codecs = nr_acodecs;
+        state = 1;
+        goto next;
+    }
+    return 0;
 }
 
 #endif

Modified: trunk/codec-cfg.h
==============================================================================
--- trunk/codec-cfg.h	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/codec-cfg.h	Tue May  4 01:34:38 2010	(r31134)
@@ -19,60 +19,60 @@
 #ifndef MPLAYER_CODEC_CFG_H
 #define MPLAYER_CODEC_CFG_H
 
-#define CODEC_CFG_MIN	20070407
+#define CODEC_CFG_MIN   20070407
 
-#define CODECS_MAX_FOURCC	92
-#define CODECS_MAX_OUTFMT	16
-#define CODECS_MAX_INFMT	16
+#define CODECS_MAX_FOURCC       92
+#define CODECS_MAX_OUTFMT       16
+#define CODECS_MAX_INFMT        16
 
 // Global flags:
-#define CODECS_FLAG_SEEKABLE	(1<<0)
-#define CODECS_FLAG_ALIGN16	(1<<1)
+#define CODECS_FLAG_SEEKABLE    (1<<0)
+#define CODECS_FLAG_ALIGN16     (1<<1)
 
 // Outfmt flags:
-#define CODECS_FLAG_FLIP	(1<<0)
-#define CODECS_FLAG_NOFLIP	(1<<1)
-#define CODECS_FLAG_YUVHACK	(1<<2)
-#define CODECS_FLAG_QUERY	(1<<3)
-#define CODECS_FLAG_STATIC	(1<<4)
+#define CODECS_FLAG_FLIP        (1<<0)
+#define CODECS_FLAG_NOFLIP      (1<<1)
+#define CODECS_FLAG_YUVHACK     (1<<2)
+#define CODECS_FLAG_QUERY       (1<<3)
+#define CODECS_FLAG_STATIC      (1<<4)
 
-#define CODECS_STATUS__MIN		0
-#define CODECS_STATUS_NOT_WORKING	-1
-#define CODECS_STATUS_PROBLEMS		0
-#define CODECS_STATUS_WORKING		1
-#define CODECS_STATUS_UNTESTED		2
-#define CODECS_STATUS__MAX		2
+#define CODECS_STATUS__MIN              0
+#define CODECS_STATUS_NOT_WORKING      -1
+#define CODECS_STATUS_PROBLEMS          0
+#define CODECS_STATUS_WORKING           1
+#define CODECS_STATUS_UNTESTED          2
+#define CODECS_STATUS__MAX              2
 
 
 #if !defined(GUID_TYPE) && !defined(GUID_DEFINED)
-#define GUID_TYPE 1
+#define GUID_TYPE    1
 #define GUID_DEFINED 1
 typedef struct {
-	unsigned long f1;
-	unsigned short f2;
-	unsigned short f3;
-	unsigned char f4[8];
+    unsigned long  f1;
+    unsigned short f2;
+    unsigned short f3;
+    unsigned char  f4[8];
 } GUID;
 #endif
 
 
 typedef struct codecs {
-	unsigned int fourcc[CODECS_MAX_FOURCC];
-	unsigned int fourccmap[CODECS_MAX_FOURCC];
-	unsigned int outfmt[CODECS_MAX_OUTFMT];
-	unsigned char outflags[CODECS_MAX_OUTFMT];
-	unsigned int infmt[CODECS_MAX_INFMT];
-	unsigned char inflags[CODECS_MAX_INFMT];
-	char *name;
-	char *info;
-	char *comment;
-	char *dll;
-	char* drv;
-	GUID guid;
-//	short driver;
-	short flags;
-	short status;
-	short cpuflags;
+    unsigned int fourcc[CODECS_MAX_FOURCC];
+    unsigned int fourccmap[CODECS_MAX_FOURCC];
+    unsigned int outfmt[CODECS_MAX_OUTFMT];
+    unsigned char outflags[CODECS_MAX_OUTFMT];
+    unsigned int infmt[CODECS_MAX_INFMT];
+    unsigned char inflags[CODECS_MAX_INFMT];
+    char *name;
+    char *info;
+    char *comment;
+    char *dll;
+    char* drv;
+    GUID guid;
+//    short driver;
+    short flags;
+    short status;
+    short cpuflags;
 } codecs_t;
 
 int parse_codec_cfg(const char *cfgfile);

Modified: trunk/command.c
==============================================================================
--- trunk/command.c	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/command.c	Tue May  4 01:34:38 2010	(r31134)
@@ -73,29 +73,29 @@ extern int use_menu;
 static void rescale_input_coordinates(int ix, int iy, double *dx, double *dy)
 {
     //remove the borders, if any, and rescale to the range [0,1],[0,1]
-    if (vo_fs) {		//we are in full-screen mode
-	if (vo_screenwidth > vo_dwidth)	//there are borders along the x axis
-	    ix -= (vo_screenwidth - vo_dwidth) / 2;
-	if (vo_screenheight > vo_dheight)	//there are borders along the y axis (usual way)
-	    iy -= (vo_screenheight - vo_dheight) / 2;
+    if (vo_fs) {                //we are in full-screen mode
+        if (vo_screenwidth > vo_dwidth) //there are borders along the x axis
+            ix -= (vo_screenwidth - vo_dwidth) / 2;
+        if (vo_screenheight > vo_dheight)       //there are borders along the y axis (usual way)
+            iy -= (vo_screenheight - vo_dheight) / 2;
 
-	if (ix < 0 || ix > vo_dwidth) {
-	    *dx = *dy = -1.0;
-	    return;
-	}			//we are on one of the borders
-	if (iy < 0 || iy > vo_dheight) {
-	    *dx = *dy = -1.0;
-	    return;
-	}			//we are on one of the borders
+        if (ix < 0 || ix > vo_dwidth) {
+            *dx = *dy = -1.0;
+            return;
+        }                       //we are on one of the borders
+        if (iy < 0 || iy > vo_dheight) {
+            *dx = *dy = -1.0;
+            return;
+        }                       //we are on one of the borders
     }
 
     *dx = (double) ix / (double) vo_dwidth;
     *dy = (double) iy / (double) vo_dheight;
 
     mp_msg(MSGT_CPLAYER, MSGL_V,
-	   "\r\nrescaled coordinates: %.3lf, %.3lf, screen (%d x %d), vodisplay: (%d, %d), fullscreen: %d\r\n",
-	   *dx, *dy, vo_screenwidth, vo_screenheight, vo_dwidth,
-	   vo_dheight, vo_fs);
+           "\r\nrescaled coordinates: %.3lf, %.3lf, screen (%d x %d), vodisplay: (%d, %d), fullscreen: %d\r\n",
+           *dx, *dy, vo_screenwidth, vo_screenheight, vo_dwidth,
+           vo_dheight, vo_fs);
 }
 
 static int sub_source_by_pos(MPContext * mpctx, int pos)
@@ -104,11 +104,11 @@ static int sub_source_by_pos(MPContext *
     int top = -1;
     int i;
     for (i = 0; i < SUB_SOURCES; i++) {
-	int j = mpctx->global_sub_indices[i];
-	if ((j >= 0) && (j > top) && (pos >= j)) {
-	    source = i;
-	    top = j;
-	}
+        int j = mpctx->global_sub_indices[i];
+        if ((j >= 0) && (j > top) && (pos >= j)) {
+            source = i;
+            top = j;
+        }
     }
     return source;
 }
@@ -135,26 +135,26 @@ static void log_sub(void)
     int i;
 
     if (subdata == NULL || vo_sub_last == NULL)
-	return;
+        return;
     fname = get_path("subtitle_log");
     f = fopen(fname, "a");
     if (!f)
-	return;
+        return;
     fprintf(f, "----------------------------------------------------------\n");
     if (subdata->sub_uses_time) {
-	fprintf(f,
-		"N: %s S: %02ld:%02ld:%02ld.%02ld E: %02ld:%02ld:%02ld.%02ld\n",
-		filename, vo_sub_last->start / 360000,
-		(vo_sub_last->start / 6000) % 60,
-		(vo_sub_last->start / 100) % 60, vo_sub_last->start % 100,
-		vo_sub_last->end / 360000, (vo_sub_last->end / 6000) % 60,
-		(vo_sub_last->end / 100) % 60, vo_sub_last->end % 100);
+        fprintf(f,
+                "N: %s S: %02ld:%02ld:%02ld.%02ld E: %02ld:%02ld:%02ld.%02ld\n",
+                filename, vo_sub_last->start / 360000,
+                (vo_sub_last->start / 6000) % 60,
+                (vo_sub_last->start / 100) % 60, vo_sub_last->start % 100,
+                vo_sub_last->end / 360000, (vo_sub_last->end / 6000) % 60,
+                (vo_sub_last->end / 100) % 60, vo_sub_last->end % 100);
     } else {
-	fprintf(f, "N: %s S: %ld E: %ld\n", filename, vo_sub_last->start,
-		vo_sub_last->end);
+        fprintf(f, "N: %s S: %ld E: %ld\n", filename, vo_sub_last->start,
+                vo_sub_last->end);
     }
     for (i = 0; i < vo_sub_last->lines; i++) {
-	fprintf(f, "%s\n", vo_sub_last->text[i]);
+        fprintf(f, "%s\n", vo_sub_last->text[i]);
     }
     fclose(f);
 }
@@ -169,7 +169,7 @@ static void log_sub(void)
 
 /// OSD level (RW)
 static int mp_property_osdlevel(m_option_t * prop, int action, void *arg,
-				MPContext * mpctx)
+                                MPContext * mpctx)
 {
     return m_property_choice(prop, action, arg, &osd_level);
 }
@@ -194,130 +194,130 @@ static int mp_property_loop(m_option_t *
 
 /// Playback speed (RW)
 static int mp_property_playback_speed(m_option_t * prop, int action,
-				      void *arg, MPContext * mpctx)
+                                      void *arg, MPContext * mpctx)
 {
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(float *) arg);
-	playback_speed = *(float *) arg;
-	build_afilter_chain(mpctx->sh_audio, &ao_data);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(float *) arg);
+        playback_speed = *(float *) arg;
+        build_afilter_chain(mpctx->sh_audio, &ao_data);
+        return M_PROPERTY_OK;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	playback_speed += (arg ? *(float *) arg : 0.1) *
-	    (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
-	M_PROPERTY_CLAMP(prop, playback_speed);
-	build_afilter_chain(mpctx->sh_audio, &ao_data);
-	return M_PROPERTY_OK;
+        playback_speed += (arg ? *(float *) arg : 0.1) *
+            (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
+        M_PROPERTY_CLAMP(prop, playback_speed);
+        build_afilter_chain(mpctx->sh_audio, &ao_data);
+        return M_PROPERTY_OK;
     }
     return m_property_float_range(prop, action, arg, &playback_speed);
 }
 
 /// filename with path (RO)
 static int mp_property_path(m_option_t * prop, int action, void *arg,
-			    MPContext * mpctx)
+                            MPContext * mpctx)
 {
     return m_property_string_ro(prop, action, arg, filename);
 }
 
 /// filename without path (RO)
 static int mp_property_filename(m_option_t * prop, int action, void *arg,
-				MPContext * mpctx)
+                                MPContext * mpctx)
 {
     char *f;
     if (!filename)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     if (((f = strrchr(filename, '/')) || (f = strrchr(filename, '\\'))) && f[1])
-	f++;
+        f++;
     else
-	f = filename;
+        f = filename;
     return m_property_string_ro(prop, action, arg, f);
 }
 
 /// Demuxer name (RO)
 static int mp_property_demuxer(m_option_t * prop, int action, void *arg,
-			       MPContext * mpctx)
+                               MPContext * mpctx)
 {
     if (!mpctx->demuxer)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_string_ro(prop, action, arg,
-				(char *) mpctx->demuxer->desc->name);
+                                (char *) mpctx->demuxer->desc->name);
 }
 
 /// Position in the stream (RW)
 static int mp_property_stream_pos(m_option_t * prop, int action, void *arg,
-				  MPContext * mpctx)
+                                  MPContext * mpctx)
 {
     if (!mpctx->demuxer || !mpctx->demuxer->stream)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     if (!arg)
-	return M_PROPERTY_ERROR;
+        return M_PROPERTY_ERROR;
     switch (action) {
     case M_PROPERTY_GET:
-	*(off_t *) arg = stream_tell(mpctx->demuxer->stream);
-	return M_PROPERTY_OK;
+        *(off_t *) arg = stream_tell(mpctx->demuxer->stream);
+        return M_PROPERTY_OK;
     case M_PROPERTY_SET:
-	M_PROPERTY_CLAMP(prop, *(off_t *) arg);
-	stream_seek(mpctx->demuxer->stream, *(off_t *) arg);
-	return M_PROPERTY_OK;
+        M_PROPERTY_CLAMP(prop, *(off_t *) arg);
+        stream_seek(mpctx->demuxer->stream, *(off_t *) arg);
+        return M_PROPERTY_OK;
     }
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
 
 /// Stream start offset (RO)
 static int mp_property_stream_start(m_option_t * prop, int action,
-				    void *arg, MPContext * mpctx)
+                                    void *arg, MPContext * mpctx)
 {
     if (!mpctx->demuxer || !mpctx->demuxer->stream)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     switch (action) {
     case M_PROPERTY_GET:
-	*(off_t *) arg = mpctx->demuxer->stream->start_pos;
-	return M_PROPERTY_OK;
+        *(off_t *) arg = mpctx->demuxer->stream->start_pos;
+        return M_PROPERTY_OK;
     }
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
 
 /// Stream end offset (RO)
 static int mp_property_stream_end(m_option_t * prop, int action, void *arg,
-				  MPContext * mpctx)
+                                  MPContext * mpctx)
 {
     if (!mpctx->demuxer || !mpctx->demuxer->stream)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     switch (action) {
     case M_PROPERTY_GET:
-	*(off_t *) arg = mpctx->demuxer->stream->end_pos;
-	return M_PROPERTY_OK;
+        *(off_t *) arg = mpctx->demuxer->stream->end_pos;
+        return M_PROPERTY_OK;
     }
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
 
 /// Stream length (RO)
 static int mp_property_stream_length(m_option_t * prop, int action,
-				     void *arg, MPContext * mpctx)
+                                     void *arg, MPContext * mpctx)
 {
     if (!mpctx->demuxer || !mpctx->demuxer->stream)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     switch (action) {
     case M_PROPERTY_GET:
-	*(off_t *) arg =
-	    mpctx->demuxer->stream->end_pos - mpctx->demuxer->stream->start_pos;
-	return M_PROPERTY_OK;
+        *(off_t *) arg =
+            mpctx->demuxer->stream->end_pos - mpctx->demuxer->stream->start_pos;
+        return M_PROPERTY_OK;
     }
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
 
 /// Media length in seconds (RO)
 static int mp_property_length(m_option_t * prop, int action, void *arg,
-			      MPContext * mpctx)
+                              MPContext * mpctx)
 {
     double len;
 
     if (!mpctx->demuxer ||
-	!(int) (len = demuxer_get_time_length(mpctx->demuxer)))
-	return M_PROPERTY_UNAVAILABLE;
+        !(int) (len = demuxer_get_time_length(mpctx->demuxer)))
+        return M_PROPERTY_UNAVAILABLE;
 
     return m_property_time_ro(prop, action, arg, len);
 }
@@ -328,7 +328,7 @@ static int mp_property_percent_pos(m_opt
     int pos;
 
     if (!mpctx->demuxer)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch(action) {
     case M_PROPERTY_SET:
@@ -532,7 +532,7 @@ static int mp_property_metadata(m_option
     static m_option_t key_type =
         { "metadata", NULL, CONF_TYPE_STRING, 0, 0, 0, NULL };
     if (!mpctx->demuxer)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch(action) {
     case M_PROPERTY_GET:
@@ -573,128 +573,128 @@ static int mp_property_pause(m_option_t 
 
 /// Volume (RW)
 static int mp_property_volume(m_option_t * prop, int action, void *arg,
-			      MPContext * mpctx)
+                              MPContext * mpctx)
 {
 
     if (!mpctx->sh_audio)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_GET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	mixer_getbothvolume(&mpctx->mixer, arg);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        mixer_getbothvolume(&mpctx->mixer, arg);
+        return M_PROPERTY_OK;
     case M_PROPERTY_PRINT:{
-	    float vol;
-	    if (!arg)
-		return M_PROPERTY_ERROR;
-	    mixer_getbothvolume(&mpctx->mixer, &vol);
-	    return m_property_float_range(prop, action, arg, &vol);
-	}
+            float vol;
+            if (!arg)
+                return M_PROPERTY_ERROR;
+            mixer_getbothvolume(&mpctx->mixer, &vol);
+            return m_property_float_range(prop, action, arg, &vol);
+        }
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
     case M_PROPERTY_SET:
-	break;
+        break;
     default:
-	return M_PROPERTY_NOT_IMPLEMENTED;
+        return M_PROPERTY_NOT_IMPLEMENTED;
     }
 
     if (mpctx->edl_muted)
-	return M_PROPERTY_DISABLED;
+        return M_PROPERTY_DISABLED;
     mpctx->user_muted = 0;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(float *) arg);
-	mixer_setvolume(&mpctx->mixer, *(float *) arg, *(float *) arg);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(float *) arg);
+        mixer_setvolume(&mpctx->mixer, *(float *) arg, *(float *) arg);
+        return M_PROPERTY_OK;
     case M_PROPERTY_STEP_UP:
-	if (arg && *(float *) arg <= 0)
-	    mixer_decvolume(&mpctx->mixer);
-	else
-	    mixer_incvolume(&mpctx->mixer);
-	return M_PROPERTY_OK;
+        if (arg && *(float *) arg <= 0)
+            mixer_decvolume(&mpctx->mixer);
+        else
+            mixer_incvolume(&mpctx->mixer);
+        return M_PROPERTY_OK;
     case M_PROPERTY_STEP_DOWN:
-	if (arg && *(float *) arg <= 0)
-	    mixer_incvolume(&mpctx->mixer);
-	else
-	    mixer_decvolume(&mpctx->mixer);
-	return M_PROPERTY_OK;
+        if (arg && *(float *) arg <= 0)
+            mixer_incvolume(&mpctx->mixer);
+        else
+            mixer_decvolume(&mpctx->mixer);
+        return M_PROPERTY_OK;
     }
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
 
 /// Mute (RW)
 static int mp_property_mute(m_option_t * prop, int action, void *arg,
-			    MPContext * mpctx)
+                            MPContext * mpctx)
 {
 
     if (!mpctx->sh_audio)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (mpctx->edl_muted)
-	    return M_PROPERTY_DISABLED;
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	if ((!!*(int *) arg) != mpctx->mixer.muted)
-	    mixer_mute(&mpctx->mixer);
-	mpctx->user_muted = mpctx->mixer.muted;
-	return M_PROPERTY_OK;
+        if (mpctx->edl_muted)
+            return M_PROPERTY_DISABLED;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        if ((!!*(int *) arg) != mpctx->mixer.muted)
+            mixer_mute(&mpctx->mixer);
+        mpctx->user_muted = mpctx->mixer.muted;
+        return M_PROPERTY_OK;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	if (mpctx->edl_muted)
-	    return M_PROPERTY_DISABLED;
-	mixer_mute(&mpctx->mixer);
-	mpctx->user_muted = mpctx->mixer.muted;
-	return M_PROPERTY_OK;
+        if (mpctx->edl_muted)
+            return M_PROPERTY_DISABLED;
+        mixer_mute(&mpctx->mixer);
+        mpctx->user_muted = mpctx->mixer.muted;
+        return M_PROPERTY_OK;
     case M_PROPERTY_PRINT:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	if (mpctx->edl_muted) {
-	    *(char **) arg = strdup(MSGTR_EnabledEdl);
-	    return M_PROPERTY_OK;
-	}
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        if (mpctx->edl_muted) {
+            *(char **) arg = strdup(MSGTR_EnabledEdl);
+            return M_PROPERTY_OK;
+        }
     default:
-	return m_property_flag(prop, action, arg, &mpctx->mixer.muted);
+        return m_property_flag(prop, action, arg, &mpctx->mixer.muted);
 
     }
 }
 
 /// Audio delay (RW)
 static int mp_property_audio_delay(m_option_t * prop, int action,
-				   void *arg, MPContext * mpctx)
+                                   void *arg, MPContext * mpctx)
 {
     if (!(mpctx->sh_audio && mpctx->sh_video))
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     switch (action) {
     case M_PROPERTY_SET:
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN: {
-	    int ret;
-	    float delay = audio_delay;
-	    ret = m_property_delay(prop, action, arg, &audio_delay);
-	    if (ret != M_PROPERTY_OK)
-		return ret;
-	    if (mpctx->sh_audio)
-		mpctx->delay -= audio_delay - delay;
-	}
-	return M_PROPERTY_OK;
+            int ret;
+            float delay = audio_delay;
+            ret = m_property_delay(prop, action, arg, &audio_delay);
+            if (ret != M_PROPERTY_OK)
+                return ret;
+            if (mpctx->sh_audio)
+                mpctx->delay -= audio_delay - delay;
+        }
+        return M_PROPERTY_OK;
     default:
-	return m_property_delay(prop, action, arg, &audio_delay);
+        return m_property_delay(prop, action, arg, &audio_delay);
     }
 }
 
 /// Audio codec tag (RO)
 static int mp_property_audio_format(m_option_t * prop, int action,
-				    void *arg, MPContext * mpctx)
+                                    void *arg, MPContext * mpctx)
 {
     if (!mpctx->sh_audio)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_int_ro(prop, action, arg, mpctx->sh_audio->format);
 }
 
@@ -703,25 +703,25 @@ static int mp_property_audio_codec(m_opt
                                    void *arg, MPContext * mpctx)
 {
     if (!mpctx->sh_audio || !mpctx->sh_audio->codec)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_string_ro(prop, action, arg, mpctx->sh_audio->codec->name);
 }
 
 /// Audio bitrate (RO)
 static int mp_property_audio_bitrate(m_option_t * prop, int action,
-				     void *arg, MPContext * mpctx)
+                                     void *arg, MPContext * mpctx)
 {
     if (!mpctx->sh_audio)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_bitrate(prop, action, arg, mpctx->sh_audio->i_bps);
 }
 
 /// Samplerate (RO)
 static int mp_property_samplerate(m_option_t * prop, int action, void *arg,
-				  MPContext * mpctx)
+                                  MPContext * mpctx)
 {
     if (!mpctx->sh_audio)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     switch(action) {
     case M_PROPERTY_PRINT:
         if(!arg) return M_PROPERTY_ERROR;
@@ -734,84 +734,84 @@ static int mp_property_samplerate(m_opti
 
 /// Number of channels (RO)
 static int mp_property_channels(m_option_t * prop, int action, void *arg,
-				MPContext * mpctx)
+                                MPContext * mpctx)
 {
     if (!mpctx->sh_audio)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     switch (action) {
     case M_PROPERTY_PRINT:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	switch (mpctx->sh_audio->channels) {
-	case 1:
-	    *(char **) arg = strdup("mono");
-	    break;
-	case 2:
-	    *(char **) arg = strdup("stereo");
-	    break;
-	default:
-	    *(char **) arg = malloc(32);
-	    sprintf(*(char **) arg, "%d channels", mpctx->sh_audio->channels);
-	}
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        switch (mpctx->sh_audio->channels) {
+        case 1:
+            *(char **) arg = strdup("mono");
+            break;
+        case 2:
+            *(char **) arg = strdup("stereo");
+            break;
+        default:
+            *(char **) arg = malloc(32);
+            sprintf(*(char **) arg, "%d channels", mpctx->sh_audio->channels);
+        }
+        return M_PROPERTY_OK;
     }
     return m_property_int_ro(prop, action, arg, mpctx->sh_audio->channels);
 }
 
 /// Balance (RW)
 static int mp_property_balance(m_option_t * prop, int action, void *arg,
-			      MPContext * mpctx)
+                              MPContext * mpctx)
 {
     float bal;
 
     if (!mpctx->sh_audio || mpctx->sh_audio->channels < 2)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_GET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	mixer_getbalance(&mpctx->mixer, arg);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        mixer_getbalance(&mpctx->mixer, arg);
+        return M_PROPERTY_OK;
     case M_PROPERTY_PRINT: {
-	    char** str = arg;
-	    if (!arg)
-		return M_PROPERTY_ERROR;
-	    mixer_getbalance(&mpctx->mixer, &bal);
-	    if (bal == 0.f)
-		*str = strdup("center");
-	    else if (bal == -1.f)
-		*str = strdup("left only");
-	    else if (bal == 1.f)
-		*str = strdup("right only");
-	    else {
-		unsigned right = (bal + 1.f) / 2.f * 100.f;
-		*str = malloc(sizeof("left xxx%, right xxx%"));
-		sprintf(*str, "left %d%%, right %d%%", 100 - right, right);
-	    }
-	    return M_PROPERTY_OK;
-	}
+            char** str = arg;
+            if (!arg)
+                return M_PROPERTY_ERROR;
+            mixer_getbalance(&mpctx->mixer, &bal);
+            if (bal == 0.f)
+                *str = strdup("center");
+            else if (bal == -1.f)
+                *str = strdup("left only");
+            else if (bal == 1.f)
+                *str = strdup("right only");
+            else {
+                unsigned right = (bal + 1.f) / 2.f * 100.f;
+                *str = malloc(sizeof("left xxx%, right xxx%"));
+                sprintf(*str, "left %d%%, right %d%%", 100 - right, right);
+            }
+            return M_PROPERTY_OK;
+        }
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	mixer_getbalance(&mpctx->mixer, &bal);
-	bal += (arg ? *(float*)arg : .1f) *
-	    (action == M_PROPERTY_STEP_UP ? 1.f : -1.f);
-	M_PROPERTY_CLAMP(prop, bal);
-	mixer_setbalance(&mpctx->mixer, bal);
-	return M_PROPERTY_OK;
+        mixer_getbalance(&mpctx->mixer, &bal);
+        bal += (arg ? *(float*)arg : .1f) *
+            (action == M_PROPERTY_STEP_UP ? 1.f : -1.f);
+        M_PROPERTY_CLAMP(prop, bal);
+        mixer_setbalance(&mpctx->mixer, bal);
+        return M_PROPERTY_OK;
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(float*)arg);
-	mixer_setbalance(&mpctx->mixer, *(float*)arg);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(float*)arg);
+        mixer_setbalance(&mpctx->mixer, *(float*)arg);
+        return M_PROPERTY_OK;
     }
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
 
 /// Selected audio id (RW)
 static int mp_property_audio(m_option_t * prop, int action, void *arg,
-			     MPContext * mpctx)
+                             MPContext * mpctx)
 {
     int current_id, tmp;
     if (!mpctx->demuxer || !mpctx->demuxer->audio)
@@ -820,72 +820,72 @@ static int mp_property_audio(m_option_t 
 
     switch (action) {
     case M_PROPERTY_GET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	*(int *) arg = current_id;
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        *(int *) arg = current_id;
+        return M_PROPERTY_OK;
     case M_PROPERTY_PRINT:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
+        if (!arg)
+            return M_PROPERTY_ERROR;
 
-	if (current_id < 0)
-	    *(char **) arg = strdup(MSGTR_Disabled);
-	else {
-	    char lang[40] = MSGTR_Unknown;
+        if (current_id < 0)
+            *(char **) arg = strdup(MSGTR_Disabled);
+        else {
+            char lang[40] = MSGTR_Unknown;
             sh_audio_t* sh = mpctx->sh_audio;
             if (sh && sh->lang)
                 av_strlcpy(lang, sh->lang, 40);
 #ifdef CONFIG_DVDREAD
-	    else if (mpctx->stream->type == STREAMTYPE_DVD) {
-		int code = dvd_lang_from_aid(mpctx->stream, current_id);
-		if (code) {
-		    lang[0] = code >> 8;
-		    lang[1] = code;
-		    lang[2] = 0;
-		}
-	    }
+            else if (mpctx->stream->type == STREAMTYPE_DVD) {
+                int code = dvd_lang_from_aid(mpctx->stream, current_id);
+                if (code) {
+                    lang[0] = code >> 8;
+                    lang[1] = code;
+                    lang[2] = 0;
+                }
+            }
 #endif
 
 #ifdef CONFIG_DVDNAV
-	    else if (mpctx->stream->type == STREAMTYPE_DVDNAV)
-		mp_dvdnav_lang_from_aid(mpctx->stream, current_id, lang);
+            else if (mpctx->stream->type == STREAMTYPE_DVDNAV)
+                mp_dvdnav_lang_from_aid(mpctx->stream, current_id, lang);
 #endif
-	    *(char **) arg = malloc(64);
-	    snprintf(*(char **) arg, 64, "(%d) %s", current_id, lang);
-	}
-	return M_PROPERTY_OK;
+            *(char **) arg = malloc(64);
+            snprintf(*(char **) arg, 64, "(%d) %s", current_id, lang);
+        }
+        return M_PROPERTY_OK;
 
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_SET:
-	if (action == M_PROPERTY_SET && arg)
-	    tmp = *((int *) arg);
-	else
-	    tmp = -1;
-	audio_id = demuxer_switch_audio(mpctx->demuxer, tmp);
-	if (audio_id == -2
-	    || (audio_id > -1
-		&& mpctx->demuxer->audio->id != current_id && current_id != -2))
-	    uninit_player(INITIALIZED_AO | INITIALIZED_ACODEC);
-	if (audio_id > -1 && mpctx->demuxer->audio->id != current_id) {
-	    sh_audio_t *sh2;
-	    sh2 = mpctx->demuxer->a_streams[mpctx->demuxer->audio->id];
-	    if (sh2) {
-		sh2->ds = mpctx->demuxer->audio;
-		mpctx->sh_audio = sh2;
-		reinit_audio_chain();
-	    }
-	}
-	mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_TRACK=%d\n", audio_id);
-	return M_PROPERTY_OK;
+        if (action == M_PROPERTY_SET && arg)
+            tmp = *((int *) arg);
+        else
+            tmp = -1;
+        audio_id = demuxer_switch_audio(mpctx->demuxer, tmp);
+        if (audio_id == -2
+            || (audio_id > -1
+                && mpctx->demuxer->audio->id != current_id && current_id != -2))
+            uninit_player(INITIALIZED_AO | INITIALIZED_ACODEC);
+        if (audio_id > -1 && mpctx->demuxer->audio->id != current_id) {
+            sh_audio_t *sh2;
+            sh2 = mpctx->demuxer->a_streams[mpctx->demuxer->audio->id];
+            if (sh2) {
+                sh2->ds = mpctx->demuxer->audio;
+                mpctx->sh_audio = sh2;
+                reinit_audio_chain();
+            }
+        }
+        mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_AUDIO_TRACK=%d\n", audio_id);
+        return M_PROPERTY_OK;
     default:
-	return M_PROPERTY_NOT_IMPLEMENTED;
+        return M_PROPERTY_NOT_IMPLEMENTED;
     }
 
 }
 
 /// Selected video id (RW)
 static int mp_property_video(m_option_t * prop, int action, void *arg,
-			     MPContext * mpctx)
+                             MPContext * mpctx)
 {
     int current_id, tmp;
     if (!mpctx->demuxer || !mpctx->demuxer->video)
@@ -894,79 +894,79 @@ static int mp_property_video(m_option_t 
 
     switch (action) {
     case M_PROPERTY_GET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	*(int *) arg = current_id;
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        *(int *) arg = current_id;
+        return M_PROPERTY_OK;
     case M_PROPERTY_PRINT:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
+        if (!arg)
+            return M_PROPERTY_ERROR;
 
-	if (current_id < 0)
-	    *(char **) arg = strdup(MSGTR_Disabled);
-	else {
-	    char lang[40] = MSGTR_Unknown;
-	    *(char **) arg = malloc(64);
-	    snprintf(*(char **) arg, 64, "(%d) %s", current_id, lang);
-	}
-	return M_PROPERTY_OK;
+        if (current_id < 0)
+            *(char **) arg = strdup(MSGTR_Disabled);
+        else {
+            char lang[40] = MSGTR_Unknown;
+            *(char **) arg = malloc(64);
+            snprintf(*(char **) arg, 64, "(%d) %s", current_id, lang);
+        }
+        return M_PROPERTY_OK;
 
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_SET:
-	if (action == M_PROPERTY_SET && arg)
-	    tmp = *((int *) arg);
-	else
-	    tmp = -1;
-	video_id = demuxer_switch_video(mpctx->demuxer, tmp);
-	if (video_id == -2
-	    || (video_id > -1 && mpctx->demuxer->video->id != current_id
-		&& current_id != -2))
-	    uninit_player(INITIALIZED_VCODEC |
-			  (fixed_vo && video_id != -2 ? 0 : INITIALIZED_VO));
-	if (video_id > -1 && mpctx->demuxer->video->id != current_id) {
-	    sh_video_t *sh2;
-	    sh2 = mpctx->demuxer->v_streams[mpctx->demuxer->video->id];
-	    if (sh2) {
-		sh2->ds = mpctx->demuxer->video;
-		mpctx->sh_video = sh2;
-		reinit_video_chain();
-	    }
-	}
-	mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_TRACK=%d\n", video_id);
-	return M_PROPERTY_OK;
+        if (action == M_PROPERTY_SET && arg)
+            tmp = *((int *) arg);
+        else
+            tmp = -1;
+        video_id = demuxer_switch_video(mpctx->demuxer, tmp);
+        if (video_id == -2
+            || (video_id > -1 && mpctx->demuxer->video->id != current_id
+                && current_id != -2))
+            uninit_player(INITIALIZED_VCODEC |
+                          (fixed_vo && video_id != -2 ? 0 : INITIALIZED_VO));
+        if (video_id > -1 && mpctx->demuxer->video->id != current_id) {
+            sh_video_t *sh2;
+            sh2 = mpctx->demuxer->v_streams[mpctx->demuxer->video->id];
+            if (sh2) {
+                sh2->ds = mpctx->demuxer->video;
+                mpctx->sh_video = sh2;
+                reinit_video_chain();
+            }
+        }
+        mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_TRACK=%d\n", video_id);
+        return M_PROPERTY_OK;
 
     default:
-	return M_PROPERTY_NOT_IMPLEMENTED;
+        return M_PROPERTY_NOT_IMPLEMENTED;
     }
 }
 
 static int mp_property_program(m_option_t * prop, int action, void *arg,
-			       MPContext * mpctx)
+                               MPContext * mpctx)
 {
     demux_program_t prog;
 
     switch (action) {
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_SET:
-	if (action == M_PROPERTY_SET && arg)
-	    prog.progid = *((int *) arg);
-	else
-	    prog.progid = -1;
-	if (demux_control
-	    (mpctx->demuxer, DEMUXER_CTRL_IDENTIFY_PROGRAM,
-	     &prog) == DEMUXER_CTRL_NOTIMPL)
-	    return M_PROPERTY_ERROR;
+        if (action == M_PROPERTY_SET && arg)
+            prog.progid = *((int *) arg);
+        else
+            prog.progid = -1;
+        if (demux_control
+            (mpctx->demuxer, DEMUXER_CTRL_IDENTIFY_PROGRAM,
+             &prog) == DEMUXER_CTRL_NOTIMPL)
+            return M_PROPERTY_ERROR;
 
-	if (prog.aid < 0 && prog.vid < 0) {
-	    mp_msg(MSGT_CPLAYER, MSGL_ERR, "Selected program contains no audio or video streams!\n");
-	    return M_PROPERTY_ERROR;
-	}
-	mp_property_do("switch_audio", M_PROPERTY_SET, &prog.aid, mpctx);
-	mp_property_do("switch_video", M_PROPERTY_SET, &prog.vid, mpctx);
-	return M_PROPERTY_OK;
+        if (prog.aid < 0 && prog.vid < 0) {
+            mp_msg(MSGT_CPLAYER, MSGL_ERR, "Selected program contains no audio or video streams!\n");
+            return M_PROPERTY_ERROR;
+        }
+        mp_property_do("switch_audio", M_PROPERTY_SET, &prog.aid, mpctx);
+        mp_property_do("switch_video", M_PROPERTY_SET, &prog.vid, mpctx);
+        return M_PROPERTY_OK;
 
     default:
-	return M_PROPERTY_NOT_IMPLEMENTED;
+        return M_PROPERTY_NOT_IMPLEMENTED;
     }
 }
 
@@ -978,95 +978,95 @@ static int mp_property_program(m_option_
 
 /// Fullscreen state (RW)
 static int mp_property_fullscreen(m_option_t * prop, int action, void *arg,
-				  MPContext * mpctx)
+                                  MPContext * mpctx)
 {
 
     if (!mpctx->video_out)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(int *) arg);
-	if (vo_fs == !!*(int *) arg)
-	    return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(int *) arg);
+        if (vo_fs == !!*(int *) arg)
+            return M_PROPERTY_OK;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
 #ifdef CONFIG_GUI
-	if (use_gui)
-	    guiGetEvent(guiIEvent, (char *) MP_CMD_GUI_FULLSCREEN);
-	else
+        if (use_gui)
+            guiGetEvent(guiIEvent, (char *) MP_CMD_GUI_FULLSCREEN);
+        else
 #endif
-	if (vo_config_count)
-	    mpctx->video_out->control(VOCTRL_FULLSCREEN, 0);
-	return M_PROPERTY_OK;
+        if (vo_config_count)
+            mpctx->video_out->control(VOCTRL_FULLSCREEN, 0);
+        return M_PROPERTY_OK;
     default:
-	return m_property_flag(prop, action, arg, &vo_fs);
+        return m_property_flag(prop, action, arg, &vo_fs);
     }
 }
 
 static int mp_property_deinterlace(m_option_t * prop, int action,
-				   void *arg, MPContext * mpctx)
+                                   void *arg, MPContext * mpctx)
 {
     int deinterlace;
     vf_instance_t *vf;
     if (!mpctx->sh_video || !mpctx->sh_video->vfilter)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     vf = mpctx->sh_video->vfilter;
     switch (action) {
     case M_PROPERTY_GET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	vf->control(vf, VFCTRL_GET_DEINTERLACE, arg);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        vf->control(vf, VFCTRL_GET_DEINTERLACE, arg);
+        return M_PROPERTY_OK;
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(int *) arg);
-	vf->control(vf, VFCTRL_SET_DEINTERLACE, arg);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(int *) arg);
+        vf->control(vf, VFCTRL_SET_DEINTERLACE, arg);
+        return M_PROPERTY_OK;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	vf->control(vf, VFCTRL_GET_DEINTERLACE, &deinterlace);
-	deinterlace = !deinterlace;
-	vf->control(vf, VFCTRL_SET_DEINTERLACE, &deinterlace);
-	set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDDeinterlace,
-	    deinterlace ? MSGTR_Enabled : MSGTR_Disabled);
-	return M_PROPERTY_OK;
+        vf->control(vf, VFCTRL_GET_DEINTERLACE, &deinterlace);
+        deinterlace = !deinterlace;
+        vf->control(vf, VFCTRL_SET_DEINTERLACE, &deinterlace);
+        set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDDeinterlace,
+            deinterlace ? MSGTR_Enabled : MSGTR_Disabled);
+        return M_PROPERTY_OK;
     }
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
 
 /// Panscan (RW)
 static int mp_property_panscan(m_option_t * prop, int action, void *arg,
-			       MPContext * mpctx)
+                               MPContext * mpctx)
 {
 
     if (!mpctx->video_out
-	|| mpctx->video_out->control(VOCTRL_GET_PANSCAN, NULL) != VO_TRUE)
-	return M_PROPERTY_UNAVAILABLE;
+        || mpctx->video_out->control(VOCTRL_GET_PANSCAN, NULL) != VO_TRUE)
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(float *) arg);
-	vo_panscan = *(float *) arg;
-	mpctx->video_out->control(VOCTRL_SET_PANSCAN, NULL);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(float *) arg);
+        vo_panscan = *(float *) arg;
+        mpctx->video_out->control(VOCTRL_SET_PANSCAN, NULL);
+        return M_PROPERTY_OK;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	vo_panscan += (arg ? *(float *) arg : 0.1) *
-	    (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
-	if (vo_panscan > 1)
-	    vo_panscan = 1;
-	else if (vo_panscan < 0)
-	    vo_panscan = 0;
-	mpctx->video_out->control(VOCTRL_SET_PANSCAN, NULL);
-	return M_PROPERTY_OK;
+        vo_panscan += (arg ? *(float *) arg : 0.1) *
+            (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
+        if (vo_panscan > 1)
+            vo_panscan = 1;
+        else if (vo_panscan < 0)
+            vo_panscan = 0;
+        mpctx->video_out->control(VOCTRL_SET_PANSCAN, NULL);
+        return M_PROPERTY_OK;
     default:
-	return m_property_float_range(prop, action, arg, &vo_panscan);
+        return m_property_float_range(prop, action, arg, &vo_panscan);
     }
 }
 
@@ -1074,125 +1074,125 @@ static int mp_property_panscan(m_option_
 /** \ingroup PropertyImplHelper
  */
 static int mp_property_vo_flag(m_option_t * prop, int action, void *arg,
-			       int vo_ctrl, int *vo_var, MPContext * mpctx)
+                               int vo_ctrl, int *vo_var, MPContext * mpctx)
 {
 
     if (!mpctx->video_out)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(int *) arg);
-	if (*vo_var == !!*(int *) arg)
-	    return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(int *) arg);
+        if (*vo_var == !!*(int *) arg)
+            return M_PROPERTY_OK;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	if (vo_config_count)
-	    mpctx->video_out->control(vo_ctrl, 0);
-	return M_PROPERTY_OK;
+        if (vo_config_count)
+            mpctx->video_out->control(vo_ctrl, 0);
+        return M_PROPERTY_OK;
     default:
-	return m_property_flag(prop, action, arg, vo_var);
+        return m_property_flag(prop, action, arg, vo_var);
     }
 }
 
 /// Window always on top (RW)
 static int mp_property_ontop(m_option_t * prop, int action, void *arg,
-			     MPContext * mpctx)
+                             MPContext * mpctx)
 {
     return mp_property_vo_flag(prop, action, arg, VOCTRL_ONTOP, &vo_ontop,
-			       mpctx);
+                               mpctx);
 }
 
 /// Display in the root window (RW)
 static int mp_property_rootwin(m_option_t * prop, int action, void *arg,
-			       MPContext * mpctx)
+                               MPContext * mpctx)
 {
     return mp_property_vo_flag(prop, action, arg, VOCTRL_ROOTWIN,
-			       &vo_rootwin, mpctx);
+                               &vo_rootwin, mpctx);
 }
 
 /// Show window borders (RW)
 static int mp_property_border(m_option_t * prop, int action, void *arg,
-			      MPContext * mpctx)
+                              MPContext * mpctx)
 {
     return mp_property_vo_flag(prop, action, arg, VOCTRL_BORDER,
-			       &vo_border, mpctx);
+                               &vo_border, mpctx);
 }
 
 /// Framedropping state (RW)
 static int mp_property_framedropping(m_option_t * prop, int action,
-				     void *arg, MPContext * mpctx)
+                                     void *arg, MPContext * mpctx)
 {
 
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_PRINT:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	*(char **) arg = strdup(frame_dropping == 1 ? MSGTR_Enabled :
-				(frame_dropping == 2 ? MSGTR_HardFrameDrop :
-				 MSGTR_Disabled));
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        *(char **) arg = strdup(frame_dropping == 1 ? MSGTR_Enabled :
+                                (frame_dropping == 2 ? MSGTR_HardFrameDrop :
+                                 MSGTR_Disabled));
+        return M_PROPERTY_OK;
     default:
-	return m_property_choice(prop, action, arg, &frame_dropping);
+        return m_property_choice(prop, action, arg, &frame_dropping);
     }
 }
 
 /// Color settings, try to use vf/vo then fall back on TV. (RW)
 static int mp_property_gamma(m_option_t * prop, int action, void *arg,
-			     MPContext * mpctx)
+                             MPContext * mpctx)
 {
     int *gamma = prop->priv, r, val;
 
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     if (gamma[0] == 1000) {
-	gamma[0] = 0;
-	get_video_colors(mpctx->sh_video, prop->name, gamma);
+        gamma[0] = 0;
+        get_video_colors(mpctx->sh_video, prop->name, gamma);
     }
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(int *) arg);
-	*gamma = *(int *) arg;
-	r = set_video_colors(mpctx->sh_video, prop->name, *gamma);
-	if (r <= 0)
-	    break;
-	return r;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(int *) arg);
+        *gamma = *(int *) arg;
+        r = set_video_colors(mpctx->sh_video, prop->name, *gamma);
+        if (r <= 0)
+            break;
+        return r;
     case M_PROPERTY_GET:
-	if (get_video_colors(mpctx->sh_video, prop->name, &val) > 0) {
-	    if (!arg)
-		return M_PROPERTY_ERROR;
-	    *(int *)arg = val;
-	    return M_PROPERTY_OK;
-	}
-	break;
+        if (get_video_colors(mpctx->sh_video, prop->name, &val) > 0) {
+            if (!arg)
+                return M_PROPERTY_ERROR;
+            *(int *)arg = val;
+            return M_PROPERTY_OK;
+        }
+        break;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	*gamma += (arg ? *(int *) arg : 1) *
-	    (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
-	M_PROPERTY_CLAMP(prop, *gamma);
-	r = set_video_colors(mpctx->sh_video, prop->name, *gamma);
-	if (r <= 0)
-	    break;
-	return r;
+        *gamma += (arg ? *(int *) arg : 1) *
+            (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
+        M_PROPERTY_CLAMP(prop, *gamma);
+        r = set_video_colors(mpctx->sh_video, prop->name, *gamma);
+        if (r <= 0)
+            break;
+        return r;
     default:
-	return M_PROPERTY_NOT_IMPLEMENTED;
+        return M_PROPERTY_NOT_IMPLEMENTED;
     }
 
 #ifdef CONFIG_TV
     if (mpctx->demuxer->type == DEMUXER_TYPE_TV) {
-	int l = strlen(prop->name);
-	char tv_prop[3 + l + 1];
-	sprintf(tv_prop, "tv_%s", prop->name);
-	return mp_property_do(tv_prop, action, arg, mpctx);
+        int l = strlen(prop->name);
+        char tv_prop[3 + l + 1];
+        sprintf(tv_prop, "tv_%s", prop->name);
+        return mp_property_do(tv_prop, action, arg, mpctx);
     }
 #endif
 
@@ -1201,22 +1201,22 @@ static int mp_property_gamma(m_option_t 
 
 /// VSync (RW)
 static int mp_property_vsync(m_option_t * prop, int action, void *arg,
-			     MPContext * mpctx)
+                             MPContext * mpctx)
 {
     return m_property_flag(prop, action, arg, &vo_vsync);
 }
 
 /// Video codec tag (RO)
 static int mp_property_video_format(m_option_t * prop, int action,
-				    void *arg, MPContext * mpctx)
+                                    void *arg, MPContext * mpctx)
 {
     char* meta;
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     switch(action) {
     case M_PROPERTY_PRINT:
         if (!arg)
-	    return M_PROPERTY_ERROR;
+            return M_PROPERTY_ERROR;
         switch(mpctx->sh_video->format) {
         case 0x10000001:
             meta = strdup ("mpeg1"); break;
@@ -1246,53 +1246,53 @@ static int mp_property_video_codec(m_opt
                                    void *arg, MPContext * mpctx)
 {
     if (!mpctx->sh_video || !mpctx->sh_video->codec)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_string_ro(prop, action, arg, mpctx->sh_video->codec->name);
 }
 
 
 /// Video bitrate (RO)
 static int mp_property_video_bitrate(m_option_t * prop, int action,
-				     void *arg, MPContext * mpctx)
+                                     void *arg, MPContext * mpctx)
 {
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_bitrate(prop, action, arg, mpctx->sh_video->i_bps);
 }
 
 /// Video display width (RO)
 static int mp_property_width(m_option_t * prop, int action, void *arg,
-			     MPContext * mpctx)
+                             MPContext * mpctx)
 {
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_int_ro(prop, action, arg, mpctx->sh_video->disp_w);
 }
 
 /// Video display height (RO)
 static int mp_property_height(m_option_t * prop, int action, void *arg,
-			      MPContext * mpctx)
+                              MPContext * mpctx)
 {
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_int_ro(prop, action, arg, mpctx->sh_video->disp_h);
 }
 
 /// Video fps (RO)
 static int mp_property_fps(m_option_t * prop, int action, void *arg,
-			   MPContext * mpctx)
+                           MPContext * mpctx)
 {
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_float_ro(prop, action, arg, mpctx->sh_video->fps);
 }
 
 /// Video aspect (RO)
 static int mp_property_aspect(m_option_t * prop, int action, void *arg,
-			      MPContext * mpctx)
+                              MPContext * mpctx)
 {
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_float_ro(prop, action, arg, mpctx->sh_video->aspect);
 }
 
@@ -1304,23 +1304,23 @@ static int mp_property_aspect(m_option_t
 
 /// Text subtitle position (RW)
 static int mp_property_sub_pos(m_option_t * prop, int action, void *arg,
-			       MPContext * mpctx)
+                               MPContext * mpctx)
 {
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
+        if (!arg)
+            return M_PROPERTY_ERROR;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	vo_osd_changed(OSDTYPE_SUBTITLE);
+        vo_osd_changed(OSDTYPE_SUBTITLE);
     default:
-	return m_property_int_range(prop, action, arg, &sub_pos);
+        return m_property_int_range(prop, action, arg, &sub_pos);
     }
 }
 
 /// Selected subtitles (RW)
 static int mp_property_sub(m_option_t * prop, int action, void *arg,
-			   MPContext * mpctx)
+                           MPContext * mpctx)
 {
     demux_stream_t *const d_sub = mpctx->d_sub;
     const int global_sub_size = mpctx->global_sub_size;
@@ -1329,120 +1329,120 @@ static int mp_property_sub(m_option_t * 
     char *sub_name;
 
     if (global_sub_size <= 0)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_GET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	*(int *) arg = mpctx->global_sub_pos;
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        *(int *) arg = mpctx->global_sub_pos;
+        return M_PROPERTY_OK;
     case M_PROPERTY_PRINT:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	*(char **) arg = malloc(64);
-	(*(char **) arg)[63] = 0;
-	sub_name = 0;
-	if (subdata)
-	    sub_name = subdata->filename;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        *(char **) arg = malloc(64);
+        (*(char **) arg)[63] = 0;
+        sub_name = 0;
+        if (subdata)
+            sub_name = subdata->filename;
 #ifdef CONFIG_ASS
-	if (ass_track && ass_track->name)
-	    sub_name = ass_track->name;
+        if (ass_track && ass_track->name)
+            sub_name = ass_track->name;
 #endif
-	if (sub_name) {
-	    char *tmp, *tmp2;
-	    tmp = sub_name;
-	    if ((tmp2 = strrchr(tmp, '/')))
-		tmp = tmp2 + 1;
+        if (sub_name) {
+            char *tmp, *tmp2;
+            tmp = sub_name;
+            if ((tmp2 = strrchr(tmp, '/')))
+                tmp = tmp2 + 1;
 
-	    snprintf(*(char **) arg, 63, "(%d) %s%s",
-		     mpctx->set_of_sub_pos + 1,
-		     strlen(tmp) < 20 ? "" : "...",
-		     strlen(tmp) < 20 ? tmp : tmp + strlen(tmp) - 19);
-	    return M_PROPERTY_OK;
-	}
+            snprintf(*(char **) arg, 63, "(%d) %s%s",
+                     mpctx->set_of_sub_pos + 1,
+                     strlen(tmp) < 20 ? "" : "...",
+                     strlen(tmp) < 20 ? tmp : tmp + strlen(tmp) - 19);
+            return M_PROPERTY_OK;
+        }
 #ifdef CONFIG_DVDNAV
-	if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
-	    if (vo_spudec && dvdsub_id >= 0) {
-		unsigned char lang[3];
-		if (mp_dvdnav_lang_from_sid(mpctx->stream, dvdsub_id, lang)) {
-		    snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang);
-		    return M_PROPERTY_OK;
-		}
-	    }
-	}
+        if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
+            if (vo_spudec && dvdsub_id >= 0) {
+                unsigned char lang[3];
+                if (mp_dvdnav_lang_from_sid(mpctx->stream, dvdsub_id, lang)) {
+                    snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang);
+                    return M_PROPERTY_OK;
+                }
+            }
+        }
 #endif
 
-	if ((mpctx->demuxer->type == DEMUXER_TYPE_MATROSKA
+        if ((mpctx->demuxer->type == DEMUXER_TYPE_MATROSKA
              || mpctx->demuxer->type == DEMUXER_TYPE_LAVF
              || mpctx->demuxer->type == DEMUXER_TYPE_LAVF_PREFERRED
              || mpctx->demuxer->type == DEMUXER_TYPE_OGG)
              && d_sub && d_sub->sh && dvdsub_id >= 0) {
             const char* lang = ((sh_sub_t*)d_sub->sh)->lang;
             if (!lang) lang = MSGTR_Unknown;
-	    snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang);
-	    return M_PROPERTY_OK;
-	}
+            snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang);
+            return M_PROPERTY_OK;
+        }
 
-	if (vo_vobsub && vobsub_id >= 0) {
-	    const char *language = MSGTR_Unknown;
-	    language = vobsub_get_id(vo_vobsub, (unsigned int) vobsub_id);
-	    snprintf(*(char **) arg, 63, "(%d) %s",
-		     vobsub_id, language ? language : MSGTR_Unknown);
-	    return M_PROPERTY_OK;
-	}
+        if (vo_vobsub && vobsub_id >= 0) {
+            const char *language = MSGTR_Unknown;
+            language = vobsub_get_id(vo_vobsub, (unsigned int) vobsub_id);
+            snprintf(*(char **) arg, 63, "(%d) %s",
+                     vobsub_id, language ? language : MSGTR_Unknown);
+            return M_PROPERTY_OK;
+        }
 #ifdef CONFIG_DVDREAD
-	if (vo_spudec && mpctx->stream->type == STREAMTYPE_DVD
-	    && dvdsub_id >= 0) {
-	    char lang[3];
-	    int code = dvd_lang_from_sid(mpctx->stream, dvdsub_id);
-	    lang[0] = code >> 8;
-	    lang[1] = code;
-	    lang[2] = 0;
-	    snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang);
-	    return M_PROPERTY_OK;
-	}
+        if (vo_spudec && mpctx->stream->type == STREAMTYPE_DVD
+            && dvdsub_id >= 0) {
+            char lang[3];
+            int code = dvd_lang_from_sid(mpctx->stream, dvdsub_id);
+            lang[0] = code >> 8;
+            lang[1] = code;
+            lang[2] = 0;
+            snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang);
+            return M_PROPERTY_OK;
+        }
 #endif
-	if (dvdsub_id >= 0) {
-	    snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, MSGTR_Unknown);
-	    return M_PROPERTY_OK;
-	}
-	snprintf(*(char **) arg, 63, MSGTR_Disabled);
-	return M_PROPERTY_OK;
+        if (dvdsub_id >= 0) {
+            snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, MSGTR_Unknown);
+            return M_PROPERTY_OK;
+        }
+        snprintf(*(char **) arg, 63, MSGTR_Disabled);
+        return M_PROPERTY_OK;
 
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	if (*(int *) arg < -1)
-	    *(int *) arg = -1;
-	else if (*(int *) arg >= global_sub_size)
-	    *(int *) arg = global_sub_size - 1;
-	mpctx->global_sub_pos = *(int *) arg;
-	break;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        if (*(int *) arg < -1)
+            *(int *) arg = -1;
+        else if (*(int *) arg >= global_sub_size)
+            *(int *) arg = global_sub_size - 1;
+        mpctx->global_sub_pos = *(int *) arg;
+        break;
     case M_PROPERTY_STEP_UP:
-	mpctx->global_sub_pos += 2;
-	mpctx->global_sub_pos =
-	    (mpctx->global_sub_pos % (global_sub_size + 1)) - 1;
-	break;
+        mpctx->global_sub_pos += 2;
+        mpctx->global_sub_pos =
+            (mpctx->global_sub_pos % (global_sub_size + 1)) - 1;
+        break;
     case M_PROPERTY_STEP_DOWN:
-	mpctx->global_sub_pos += global_sub_size + 1;
-	mpctx->global_sub_pos =
-	    (mpctx->global_sub_pos % (global_sub_size + 1)) - 1;
-	break;
+        mpctx->global_sub_pos += global_sub_size + 1;
+        mpctx->global_sub_pos =
+            (mpctx->global_sub_pos % (global_sub_size + 1)) - 1;
+        break;
     default:
-	return M_PROPERTY_NOT_IMPLEMENTED;
+        return M_PROPERTY_NOT_IMPLEMENTED;
     }
 
     if (mpctx->global_sub_pos >= 0)
-	source = sub_source(mpctx);
+        source = sub_source(mpctx);
 
     mp_msg(MSGT_CPLAYER, MSGL_DBG3,
-	   "subtitles: %d subs, (v@%d s@%d d@%d), @%d, source @%d\n",
-	   global_sub_size,
-	   mpctx->global_sub_indices[SUB_SOURCE_VOBSUB],
-	   mpctx->global_sub_indices[SUB_SOURCE_SUBS],
-	   mpctx->global_sub_indices[SUB_SOURCE_DEMUX],
-	   mpctx->global_sub_pos, source);
+           "subtitles: %d subs, (v@%d s@%d d@%d), @%d, source @%d\n",
+           global_sub_size,
+           mpctx->global_sub_indices[SUB_SOURCE_VOBSUB],
+           mpctx->global_sub_indices[SUB_SOURCE_SUBS],
+           mpctx->global_sub_indices[SUB_SOURCE_DEMUX],
+           mpctx->global_sub_pos, source);
 
     mpctx->set_of_sub_pos = -1;
     subdata = NULL;
@@ -1450,9 +1450,9 @@ static int mp_property_sub(m_option_t * 
     vobsub_id = -1;
     dvdsub_id = -1;
     if (d_sub) {
-	if (d_sub->id > -2)
-	    reset_spu = 1;
-	d_sub->id = -2;
+        if (d_sub->id > -2)
+            reset_spu = 1;
+        d_sub->id = -2;
     }
 #ifdef CONFIG_ASS
     ass_track = 0;
@@ -1461,55 +1461,55 @@ static int mp_property_sub(m_option_t * 
     if (source == SUB_SOURCE_VOBSUB) {
         vobsub_id = vobsub_get_id_by_index(vo_vobsub, mpctx->global_sub_pos - mpctx->global_sub_indices[SUB_SOURCE_VOBSUB]);
     } else if (source == SUB_SOURCE_SUBS) {
-	mpctx->set_of_sub_pos =
-	    mpctx->global_sub_pos - mpctx->global_sub_indices[SUB_SOURCE_SUBS];
+        mpctx->set_of_sub_pos =
+            mpctx->global_sub_pos - mpctx->global_sub_indices[SUB_SOURCE_SUBS];
 #ifdef CONFIG_ASS
-	if (ass_enabled && mpctx->set_of_ass_tracks[mpctx->set_of_sub_pos])
-	    ass_track = mpctx->set_of_ass_tracks[mpctx->set_of_sub_pos];
-	else
+        if (ass_enabled && mpctx->set_of_ass_tracks[mpctx->set_of_sub_pos])
+            ass_track = mpctx->set_of_ass_tracks[mpctx->set_of_sub_pos];
+        else
 #endif
-	{
-	    subdata = mpctx->set_of_subtitles[mpctx->set_of_sub_pos];
-	    vo_osd_changed(OSDTYPE_SUBTITLE);
-	}
+        {
+            subdata = mpctx->set_of_subtitles[mpctx->set_of_sub_pos];
+            vo_osd_changed(OSDTYPE_SUBTITLE);
+        }
     } else if (source == SUB_SOURCE_DEMUX) {
-	dvdsub_id =
-	    mpctx->global_sub_pos - mpctx->global_sub_indices[SUB_SOURCE_DEMUX];
-	if (d_sub && dvdsub_id < MAX_S_STREAMS) {
-	    int i = 0;
-	    // default: assume 1:1 mapping of sid and stream id
-	    d_sub->id = dvdsub_id;
-	    d_sub->sh = mpctx->demuxer->s_streams[d_sub->id];
-	    ds_free_packs(d_sub);
-	    for (i = 0; i < MAX_S_STREAMS; i++) {
-		sh_sub_t *sh = mpctx->demuxer->s_streams[i];
-		if (sh && sh->sid == dvdsub_id) {
-		    d_sub->id = i;
-		    d_sub->sh = sh;
-		    break;
-		}
-	    }
-	    if (d_sub->sh && d_sub->id >= 0) {
-		sh_sub_t *sh = d_sub->sh;
-		if (sh->type == 'v')
-		    init_vo_spudec();
+        dvdsub_id =
+            mpctx->global_sub_pos - mpctx->global_sub_indices[SUB_SOURCE_DEMUX];
+        if (d_sub && dvdsub_id < MAX_S_STREAMS) {
+            int i = 0;
+            // default: assume 1:1 mapping of sid and stream id
+            d_sub->id = dvdsub_id;
+            d_sub->sh = mpctx->demuxer->s_streams[d_sub->id];
+            ds_free_packs(d_sub);
+            for (i = 0; i < MAX_S_STREAMS; i++) {
+                sh_sub_t *sh = mpctx->demuxer->s_streams[i];
+                if (sh && sh->sid == dvdsub_id) {
+                    d_sub->id = i;
+                    d_sub->sh = sh;
+                    break;
+                }
+            }
+            if (d_sub->sh && d_sub->id >= 0) {
+                sh_sub_t *sh = d_sub->sh;
+                if (sh->type == 'v')
+                    init_vo_spudec();
 #ifdef CONFIG_ASS
-		else if (ass_enabled)
-		    ass_track = sh->ass_track;
+                else if (ass_enabled)
+                    ass_track = sh->ass_track;
 #endif
             } else {
               d_sub->id = -2;
               d_sub->sh = NULL;
-	    }
-	}
+            }
+        }
     }
 #ifdef CONFIG_DVDREAD
     if (vo_spudec
-	&& (mpctx->stream->type == STREAMTYPE_DVD
-	    || mpctx->stream->type == STREAMTYPE_DVDNAV)
-	&& dvdsub_id < 0 && reset_spu) {
-	d_sub->id = -2;
-	d_sub->sh = NULL;
+        && (mpctx->stream->type == STREAMTYPE_DVD
+            || mpctx->stream->type == STREAMTYPE_DVDNAV)
+        && dvdsub_id < 0 && reset_spu) {
+        d_sub->id = -2;
+        d_sub->sh = NULL;
     }
 #endif
     if (mpctx->sh_audio)
@@ -1701,101 +1701,101 @@ static int mp_property_sub_by_type(m_opt
 
 /// Subtitle delay (RW)
 static int mp_property_sub_delay(m_option_t * prop, int action, void *arg,
-				 MPContext * mpctx)
+                                 MPContext * mpctx)
 {
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
     return m_property_delay(prop, action, arg, &sub_delay);
 }
 
 /// Alignment of text subtitles (RW)
 static int mp_property_sub_alignment(m_option_t * prop, int action,
-				     void *arg, MPContext * mpctx)
+                                     void *arg, MPContext * mpctx)
 {
     char *name[] = { MSGTR_Top, MSGTR_Center, MSGTR_Bottom };
 
     if (!mpctx->sh_video || mpctx->global_sub_pos < 0
-	|| sub_source(mpctx) != SUB_SOURCE_SUBS)
-	return M_PROPERTY_UNAVAILABLE;
+        || sub_source(mpctx) != SUB_SOURCE_SUBS)
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_PRINT:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, sub_alignment);
-	*(char **) arg = strdup(name[sub_alignment]);
-	return M_PROPERTY_OK;
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, sub_alignment);
+        *(char **) arg = strdup(name[sub_alignment]);
+        return M_PROPERTY_OK;
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
+        if (!arg)
+            return M_PROPERTY_ERROR;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	vo_osd_changed(OSDTYPE_SUBTITLE);
+        vo_osd_changed(OSDTYPE_SUBTITLE);
     default:
-	return m_property_choice(prop, action, arg, &sub_alignment);
+        return m_property_choice(prop, action, arg, &sub_alignment);
     }
 }
 
 /// Subtitle visibility (RW)
 static int mp_property_sub_visibility(m_option_t * prop, int action,
-				      void *arg, MPContext * mpctx)
+                                      void *arg, MPContext * mpctx)
 {
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
+        if (!arg)
+            return M_PROPERTY_ERROR;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	vo_osd_changed(OSDTYPE_SUBTITLE);
-	if (vo_spudec)
-	    vo_osd_changed(OSDTYPE_SPU);
+        vo_osd_changed(OSDTYPE_SUBTITLE);
+        if (vo_spudec)
+            vo_osd_changed(OSDTYPE_SPU);
     default:
-	return m_property_flag(prop, action, arg, &sub_visibility);
+        return m_property_flag(prop, action, arg, &sub_visibility);
     }
 }
 
 #ifdef CONFIG_ASS
 /// Use margins for libass subtitles (RW)
 static int mp_property_ass_use_margins(m_option_t * prop, int action,
-				      void *arg, MPContext * mpctx)
+                                      void *arg, MPContext * mpctx)
 {
     if (!mpctx->sh_video)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
+        if (!arg)
+            return M_PROPERTY_ERROR;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	ass_force_reload = 1;
+        ass_force_reload = 1;
     default:
-	return m_property_flag(prop, action, arg, &ass_use_margins);
+        return m_property_flag(prop, action, arg, &ass_use_margins);
     }
 }
 #endif
 
 /// Show only forced subtitles (RW)
 static int mp_property_sub_forced_only(m_option_t * prop, int action,
-				       void *arg, MPContext * mpctx)
+                                       void *arg, MPContext * mpctx)
 {
     if (!vo_spudec)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
+        if (!arg)
+            return M_PROPERTY_ERROR;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	m_property_flag(prop, action, arg, &forced_subs_only);
-	spudec_set_forced_subs_only(vo_spudec, forced_subs_only);
-	return M_PROPERTY_OK;
+        m_property_flag(prop, action, arg, &forced_subs_only);
+        spudec_set_forced_subs_only(vo_spudec, forced_subs_only);
+        return M_PROPERTY_OK;
     default:
-	return m_property_flag(prop, action, arg, &forced_subs_only);
+        return m_property_flag(prop, action, arg, &forced_subs_only);
     }
 
 }
@@ -1803,7 +1803,7 @@ static int mp_property_sub_forced_only(m
 #ifdef CONFIG_FREETYPE
 /// Subtitle scale (RW)
 static int mp_property_sub_scale(m_option_t * prop, int action, void *arg,
-			      MPContext * mpctx)
+                              MPContext * mpctx)
 {
 
     switch (action) {
@@ -1856,32 +1856,32 @@ static int mp_property_sub_scale(m_optio
 
 /// TV color settings (RW)
 static int mp_property_tv_color(m_option_t * prop, int action, void *arg,
-				MPContext * mpctx)
+                                MPContext * mpctx)
 {
     int r, val;
     tvi_handle_t *tvh = mpctx->demuxer->priv;
     if (mpctx->demuxer->type != DEMUXER_TYPE_TV || !tvh)
-	return M_PROPERTY_UNAVAILABLE;
+        return M_PROPERTY_UNAVAILABLE;
 
     switch (action) {
     case M_PROPERTY_SET:
-	if (!arg)
-	    return M_PROPERTY_ERROR;
-	M_PROPERTY_CLAMP(prop, *(int *) arg);
-	return tv_set_color_options(tvh, (int) prop->priv, *(int *) arg);
+        if (!arg)
+            return M_PROPERTY_ERROR;
+        M_PROPERTY_CLAMP(prop, *(int *) arg);
+        return tv_set_color_options(tvh, (int) prop->priv, *(int *) arg);
     case M_PROPERTY_GET:
-	return tv_get_color_options(tvh, (int) prop->priv, arg);
+        return tv_get_color_options(tvh, (int) prop->priv, arg);
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-	if ((r = tv_get_color_options(tvh, (int) prop->priv, &val)) >= 0) {
-	    if (!r)
-		return M_PROPERTY_ERROR;
-	    val += (arg ? *(int *) arg : 1) *
-		(action == M_PROPERTY_STEP_DOWN ? -1 : 1);
-	    M_PROPERTY_CLAMP(prop, val);
-	    return tv_set_color_options(tvh, (int) prop->priv, val);
-	}
-	return M_PROPERTY_ERROR;
+        if ((r = tv_get_color_options(tvh, (int) prop->priv, &val)) >= 0) {
+            if (!r)
+                return M_PROPERTY_ERROR;
+            val += (arg ? *(int *) arg : 1) *
+                (action == M_PROPERTY_STEP_DOWN ? -1 : 1);
+            M_PROPERTY_CLAMP(prop, val);
+            return tv_set_color_options(tvh, (int) prop->priv, val);
+        }
+        return M_PROPERTY_ERROR;
     }
     return M_PROPERTY_NOT_IMPLEMENTED;
 }
@@ -2219,7 +2219,7 @@ static struct {
     { "saturation", MP_CMD_SATURATION, 0, OSD_SATURATION, -1, MSGTR_Saturation },
     { "hue", MP_CMD_HUE, 0, OSD_HUE, -1, MSGTR_Hue },
     { "vsync", MP_CMD_SWITCH_VSYNC, 1, 0, -1, MSGTR_VSyncStatus },
-	// subs
+        // subs
     { "sub", MP_CMD_SUB_SELECT, 1, 0, -1, MSGTR_SubSelectStatus },
     { "sub_source", MP_CMD_SUB_SOURCE, 1, 0, -1, MSGTR_SubSourceStatus },
     { "sub_vob", MP_CMD_SUB_VOB, 1, 0, -1, MSGTR_SubSelectStatus },
@@ -2255,53 +2255,53 @@ static int set_property_command(MPContex
 
     // look for the command
     for (i = 0; set_prop_cmd[i].name; i++)
-	if (set_prop_cmd[i].cmd == cmd->id)
-	    break;
+        if (set_prop_cmd[i].cmd == cmd->id)
+            break;
     if (!(pname = set_prop_cmd[i].name))
-	return 0;
+        return 0;
 
     if (mp_property_do(pname,M_PROPERTY_GET_TYPE,&prop,mpctx) <= 0 || !prop)
         return 0;
 
     // toggle command
     if (set_prop_cmd[i].toggle) {
-	// set to value
-	if (cmd->nargs > 0 && cmd->args[0].v.i >= prop->min)
-	    r = mp_property_do(pname, M_PROPERTY_SET, &cmd->args[0].v.i, mpctx);
-	else
-	    r = mp_property_do(pname, M_PROPERTY_STEP_UP, NULL, mpctx);
-    } else if (cmd->args[1].v.i)	//set
-	r = mp_property_do(pname, M_PROPERTY_SET, &cmd->args[0].v, mpctx);
-    else			// adjust
-	r = mp_property_do(pname, M_PROPERTY_STEP_UP, &cmd->args[0].v, mpctx);
+        // set to value
+        if (cmd->nargs > 0 && cmd->args[0].v.i >= prop->min)
+            r = mp_property_do(pname, M_PROPERTY_SET, &cmd->args[0].v.i, mpctx);
+        else
+            r = mp_property_do(pname, M_PROPERTY_STEP_UP, NULL, mpctx);
+    } else if (cmd->args[1].v.i)        //set
+        r = mp_property_do(pname, M_PROPERTY_SET, &cmd->args[0].v, mpctx);
+    else                        // adjust
+        r = mp_property_do(pname, M_PROPERTY_STEP_UP, &cmd->args[0].v, mpctx);
 
     if (r <= 0)
-	return 1;
+        return 1;
 
     if (set_prop_cmd[i].osd_progbar) {
-	if (prop->type == CONF_TYPE_INT) {
-	    if (mp_property_do(pname, M_PROPERTY_GET, &r, mpctx) > 0)
-		set_osd_bar(set_prop_cmd[i].osd_progbar,
-			    set_prop_cmd[i].osd_msg, prop->min, prop->max, r);
-	} else if (prop->type == CONF_TYPE_FLOAT) {
-	    float f;
-	    if (mp_property_do(pname, M_PROPERTY_GET, &f, mpctx) > 0)
-		set_osd_bar(set_prop_cmd[i].osd_progbar,
-			    set_prop_cmd[i].osd_msg, prop->min, prop->max, f);
-	} else
-	    mp_msg(MSGT_CPLAYER, MSGL_ERR,
-		   "Property use an unsupported type.\n");
-	return 1;
+        if (prop->type == CONF_TYPE_INT) {
+            if (mp_property_do(pname, M_PROPERTY_GET, &r, mpctx) > 0)
+                set_osd_bar(set_prop_cmd[i].osd_progbar,
+                            set_prop_cmd[i].osd_msg, prop->min, prop->max, r);
+        } else if (prop->type == CONF_TYPE_FLOAT) {
+            float f;
+            if (mp_property_do(pname, M_PROPERTY_GET, &f, mpctx) > 0)
+                set_osd_bar(set_prop_cmd[i].osd_progbar,
+                            set_prop_cmd[i].osd_msg, prop->min, prop->max, f);
+        } else
+            mp_msg(MSGT_CPLAYER, MSGL_ERR,
+                   "Property use an unsupported type.\n");
+        return 1;
     }
 
     if (set_prop_cmd[i].osd_msg) {
-	char *val = mp_property_print(pname, mpctx);
-	if (val) {
-	    set_osd_msg(set_prop_cmd[i].osd_id >=
-			0 ? set_prop_cmd[i].osd_id : OSD_MSG_PROPERTY + i,
-			1, osd_duration, set_prop_cmd[i].osd_msg, val);
-	    free(val);
-	}
+        char *val = mp_property_print(pname, mpctx);
+        if (val) {
+            set_osd_msg(set_prop_cmd[i].osd_id >=
+                        0 ? set_prop_cmd[i].osd_id : OSD_MSG_PROPERTY + i,
+                        1, osd_duration, set_prop_cmd[i].osd_msg, val);
+            free(val);
+        }
     }
     return 1;
 }
@@ -2413,416 +2413,416 @@ int run_command(MPContext * mpctx, mp_cm
     sh_video_t * const sh_video = mpctx->sh_video;
     int brk_cmd = 0;
     if (!set_property_command(mpctx, cmd))
-	switch (cmd->id) {
-	case MP_CMD_SEEK:{
-		float v;
-		int abs;
-		if (sh_video)
-		    mpctx->osd_show_percentage = sh_video->fps;
-		v = cmd->args[0].v.f;
-		abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
-		if (abs == 2) {	/* Absolute seek to a specific timestamp in seconds */
-		    abs_seek_pos = SEEK_ABSOLUTE;
-		    if (sh_video)
-			mpctx->osd_function =
-			    (v > sh_video->pts) ? OSD_FFW : OSD_REW;
-		    rel_seek_secs = v;
-		} else if (abs) {	/* Absolute seek by percentage */
-		    abs_seek_pos = SEEK_ABSOLUTE | SEEK_FACTOR;
-		    if (sh_video)
-			mpctx->osd_function = OSD_FFW;	// Direction isn't set correctly
-		    rel_seek_secs = v / 100.0;
-		} else {
-		    rel_seek_secs += v;
-		    mpctx->osd_function = (v > 0) ? OSD_FFW : OSD_REW;
-		}
-		brk_cmd = 1;
-	    }
-	    break;
+        switch (cmd->id) {
+        case MP_CMD_SEEK:{
+                float v;
+                int abs;
+                if (sh_video)
+                    mpctx->osd_show_percentage = sh_video->fps;
+                v = cmd->args[0].v.f;
+                abs = (cmd->nargs > 1) ? cmd->args[1].v.i : 0;
+                if (abs == 2) { /* Absolute seek to a specific timestamp in seconds */
+                    abs_seek_pos = SEEK_ABSOLUTE;
+                    if (sh_video)
+                        mpctx->osd_function =
+                            (v > sh_video->pts) ? OSD_FFW : OSD_REW;
+                    rel_seek_secs = v;
+                } else if (abs) {       /* Absolute seek by percentage */
+                    abs_seek_pos = SEEK_ABSOLUTE | SEEK_FACTOR;
+                    if (sh_video)
+                        mpctx->osd_function = OSD_FFW;  // Direction isn't set correctly
+                    rel_seek_secs = v / 100.0;
+                } else {
+                    rel_seek_secs += v;
+                    mpctx->osd_function = (v > 0) ? OSD_FFW : OSD_REW;
+                }
+                brk_cmd = 1;
+            }
+            break;
 
-	case MP_CMD_SET_PROPERTY:{
-		int r = mp_property_do(cmd->args[0].v.s, M_PROPERTY_PARSE,
-				       cmd->args[1].v.s, mpctx);
-		if (r == M_PROPERTY_UNKNOWN)
-		    mp_msg(MSGT_CPLAYER, MSGL_WARN,
-			   "Unknown property: '%s'\n", cmd->args[0].v.s);
-		else if (r <= 0)
-		    mp_msg(MSGT_CPLAYER, MSGL_WARN,
-			   "Failed to set property '%s' to '%s'.\n",
-			   cmd->args[0].v.s, cmd->args[1].v.s);
-		if (r <= 0)
-		    mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_ERROR=%s\n", property_error_string(r));
-	    }
-	    break;
+        case MP_CMD_SET_PROPERTY:{
+                int r = mp_property_do(cmd->args[0].v.s, M_PROPERTY_PARSE,
+                                       cmd->args[1].v.s, mpctx);
+                if (r == M_PROPERTY_UNKNOWN)
+                    mp_msg(MSGT_CPLAYER, MSGL_WARN,
+                           "Unknown property: '%s'\n", cmd->args[0].v.s);
+                else if (r <= 0)
+                    mp_msg(MSGT_CPLAYER, MSGL_WARN,
+                           "Failed to set property '%s' to '%s'.\n",
+                           cmd->args[0].v.s, cmd->args[1].v.s);
+                if (r <= 0)
+                    mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_ERROR=%s\n", property_error_string(r));
+            }
+            break;
 
-	case MP_CMD_STEP_PROPERTY:{
-		void* arg = NULL;
-		int r,i;
-		double d;
-		off_t o;
-		if (cmd->args[1].v.f) {
-		    m_option_t* prop;
-		    if((r = mp_property_do(cmd->args[0].v.s,
-		                           M_PROPERTY_GET_TYPE,
-		                           &prop, mpctx)) <= 0)
-		        goto step_prop_err;
-		    if(prop->type == CONF_TYPE_INT ||
-		       prop->type == CONF_TYPE_FLAG)
-		        i = cmd->args[1].v.f, arg = &i;
-		    else if(prop->type == CONF_TYPE_FLOAT)
-		        arg = &cmd->args[1].v.f;
-		    else if(prop->type == CONF_TYPE_DOUBLE ||
-		            prop->type == CONF_TYPE_TIME)
-		        d = cmd->args[1].v.f, arg = &d;
-		    else if(prop->type == CONF_TYPE_POSITION)
-		        o = cmd->args[1].v.f, arg = &o;
-		    else
-		        mp_msg(MSGT_CPLAYER, MSGL_WARN,
-		               "Ignoring step size stepping property '%s'.\n",
-		               cmd->args[0].v.s);
-		}
-		r = mp_property_do(cmd->args[0].v.s,
-		                   cmd->args[2].v.i < 0 ?
-		                   M_PROPERTY_STEP_DOWN : M_PROPERTY_STEP_UP,
-		                   arg, mpctx);
-	    step_prop_err:
-		if (r == M_PROPERTY_UNKNOWN)
-		    mp_msg(MSGT_CPLAYER, MSGL_WARN,
-			   "Unknown property: '%s'\n", cmd->args[0].v.s);
-		else if (r <= 0)
-		    mp_msg(MSGT_CPLAYER, MSGL_WARN,
-			   "Failed to increment property '%s' by %f.\n",
-			   cmd->args[0].v.s, cmd->args[1].v.f);
-		if (r <= 0)
-		    mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_ERROR=%s\n", property_error_string(r));
-	    }
-	    break;
+        case MP_CMD_STEP_PROPERTY:{
+                void* arg = NULL;
+                int r,i;
+                double d;
+                off_t o;
+                if (cmd->args[1].v.f) {
+                    m_option_t* prop;
+                    if((r = mp_property_do(cmd->args[0].v.s,
+                                           M_PROPERTY_GET_TYPE,
+                                           &prop, mpctx)) <= 0)
+                        goto step_prop_err;
+                    if(prop->type == CONF_TYPE_INT ||
+                       prop->type == CONF_TYPE_FLAG)
+                        i = cmd->args[1].v.f, arg = &i;
+                    else if(prop->type == CONF_TYPE_FLOAT)
+                        arg = &cmd->args[1].v.f;
+                    else if(prop->type == CONF_TYPE_DOUBLE ||
+                            prop->type == CONF_TYPE_TIME)
+                        d = cmd->args[1].v.f, arg = &d;
+                    else if(prop->type == CONF_TYPE_POSITION)
+                        o = cmd->args[1].v.f, arg = &o;
+                    else
+                        mp_msg(MSGT_CPLAYER, MSGL_WARN,
+                               "Ignoring step size stepping property '%s'.\n",
+                               cmd->args[0].v.s);
+                }
+                r = mp_property_do(cmd->args[0].v.s,
+                                   cmd->args[2].v.i < 0 ?
+                                   M_PROPERTY_STEP_DOWN : M_PROPERTY_STEP_UP,
+                                   arg, mpctx);
+            step_prop_err:
+                if (r == M_PROPERTY_UNKNOWN)
+                    mp_msg(MSGT_CPLAYER, MSGL_WARN,
+                           "Unknown property: '%s'\n", cmd->args[0].v.s);
+                else if (r <= 0)
+                    mp_msg(MSGT_CPLAYER, MSGL_WARN,
+                           "Failed to increment property '%s' by %f.\n",
+                           cmd->args[0].v.s, cmd->args[1].v.f);
+                if (r <= 0)
+                    mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_ERROR=%s\n", property_error_string(r));
+            }
+            break;
 
-	case MP_CMD_GET_PROPERTY:{
-		char *tmp;
-		int r = mp_property_do(cmd->args[0].v.s, M_PROPERTY_TO_STRING,
-				       &tmp, mpctx);
-		if (r <= 0) {
-		    mp_msg(MSGT_CPLAYER, MSGL_WARN,
-			   "Failed to get value of property '%s'.\n",
-			   cmd->args[0].v.s);
-		    mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_ERROR=%s\n", property_error_string(r));
-		    break;
-		}
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_%s=%s\n",
-		       cmd->args[0].v.s, tmp);
-		free(tmp);
-	    }
-	    break;
+        case MP_CMD_GET_PROPERTY:{
+                char *tmp;
+                int r = mp_property_do(cmd->args[0].v.s, M_PROPERTY_TO_STRING,
+                                       &tmp, mpctx);
+                if (r <= 0) {
+                    mp_msg(MSGT_CPLAYER, MSGL_WARN,
+                           "Failed to get value of property '%s'.\n",
+                           cmd->args[0].v.s);
+                    mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_ERROR=%s\n", property_error_string(r));
+                    break;
+                }
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_%s=%s\n",
+                       cmd->args[0].v.s, tmp);
+                free(tmp);
+            }
+            break;
 
-	case MP_CMD_EDL_MARK:
-	    if (edl_fd) {
-		float v = sh_video ? sh_video->pts :
-		    playing_audio_pts(sh_audio, mpctx->d_audio,
-				      mpctx->audio_out);
+        case MP_CMD_EDL_MARK:
+            if (edl_fd) {
+                float v = sh_video ? sh_video->pts :
+                    playing_audio_pts(sh_audio, mpctx->d_audio,
+                                      mpctx->audio_out);
 
-		if (mpctx->begin_skip == MP_NOPTS_VALUE) {
-		    mpctx->begin_skip = v;
-		    mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutStartSkip);
-		} else {
-		    if (mpctx->begin_skip > v)
-			mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdloutBadStop);
-		    else {
-			fprintf(edl_fd, "%f %f %d\n", mpctx->begin_skip, v, 0);
-			mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutEndSkip);
-		    }
-		    mpctx->begin_skip = MP_NOPTS_VALUE;
-		}
-	    }
-	    break;
+                if (mpctx->begin_skip == MP_NOPTS_VALUE) {
+                    mpctx->begin_skip = v;
+                    mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutStartSkip);
+                } else {
+                    if (mpctx->begin_skip > v)
+                        mp_msg(MSGT_CPLAYER, MSGL_WARN, MSGTR_EdloutBadStop);
+                    else {
+                        fprintf(edl_fd, "%f %f %d\n", mpctx->begin_skip, v, 0);
+                        mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_EdloutEndSkip);
+                    }
+                    mpctx->begin_skip = MP_NOPTS_VALUE;
+                }
+            }
+            break;
 
-	case MP_CMD_SWITCH_RATIO:
+        case MP_CMD_SWITCH_RATIO:
             if (!sh_video)
                 break;
-	    if (cmd->nargs == 0 || cmd->args[0].v.f == -1)
-		movie_aspect = (float) sh_video->disp_w / sh_video->disp_h;
-	    else
-		movie_aspect = cmd->args[0].v.f;
-	    mpcodecs_config_vo(sh_video, sh_video->disp_w, sh_video->disp_h, 0);
-	    break;
+            if (cmd->nargs == 0 || cmd->args[0].v.f == -1)
+                movie_aspect = (float) sh_video->disp_w / sh_video->disp_h;
+            else
+                movie_aspect = cmd->args[0].v.f;
+            mpcodecs_config_vo(sh_video, sh_video->disp_w, sh_video->disp_h, 0);
+            break;
 
-	case MP_CMD_SPEED_INCR:{
-		float v = cmd->args[0].v.f;
-		playback_speed += v;
-		build_afilter_chain(sh_audio, &ao_data);
-		set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDSpeed,
-			    playback_speed);
-	    } break;
+        case MP_CMD_SPEED_INCR:{
+                float v = cmd->args[0].v.f;
+                playback_speed += v;
+                build_afilter_chain(sh_audio, &ao_data);
+                set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDSpeed,
+                            playback_speed);
+            } break;
 
-	case MP_CMD_SPEED_MULT:{
-		float v = cmd->args[0].v.f;
-		playback_speed *= v;
-		build_afilter_chain(sh_audio, &ao_data);
-		set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDSpeed,
-			    playback_speed);
-	    } break;
+        case MP_CMD_SPEED_MULT:{
+                float v = cmd->args[0].v.f;
+                playback_speed *= v;
+                build_afilter_chain(sh_audio, &ao_data);
+                set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDSpeed,
+                            playback_speed);
+            } break;
 
-	case MP_CMD_SPEED_SET:{
-		float v = cmd->args[0].v.f;
-		playback_speed = v;
-		build_afilter_chain(sh_audio, &ao_data);
-		set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDSpeed,
-			    playback_speed);
-	    } break;
+        case MP_CMD_SPEED_SET:{
+                float v = cmd->args[0].v.f;
+                playback_speed = v;
+                build_afilter_chain(sh_audio, &ao_data);
+                set_osd_msg(OSD_MSG_SPEED, 1, osd_duration, MSGTR_OSDSpeed,
+                            playback_speed);
+            } break;
 
-	case MP_CMD_FRAME_STEP:
-	case MP_CMD_PAUSE:
-	    cmd->pausing = 1;
-	    brk_cmd = 1;
-	    break;
+        case MP_CMD_FRAME_STEP:
+        case MP_CMD_PAUSE:
+            cmd->pausing = 1;
+            brk_cmd = 1;
+            break;
 
-	case MP_CMD_FILE_FILTER:
-	    file_filter = cmd->args[0].v.i;
-	    break;
+        case MP_CMD_FILE_FILTER:
+            file_filter = cmd->args[0].v.i;
+            break;
 
-	case MP_CMD_QUIT:
-	    exit_player_with_rc(EXIT_QUIT,
-				(cmd->nargs > 0) ? cmd->args[0].v.i : 0);
+        case MP_CMD_QUIT:
+            exit_player_with_rc(EXIT_QUIT,
+                                (cmd->nargs > 0) ? cmd->args[0].v.i : 0);
 
-	case MP_CMD_PLAY_TREE_STEP:{
-		int n = cmd->args[0].v.i == 0 ? 1 : cmd->args[0].v.i;
-		int force = cmd->args[1].v.i;
+        case MP_CMD_PLAY_TREE_STEP:{
+                int n = cmd->args[0].v.i == 0 ? 1 : cmd->args[0].v.i;
+                int force = cmd->args[1].v.i;
 
 #ifdef CONFIG_GUI
-		if (use_gui) {
-		    int i = 0;
-		    if (n > 0)
-			for (i = 0; i < n; i++)
-			    mplNext();
-		    else
-			for (i = 0; i < -1 * n; i++)
-			    mplPrev();
-		} else
+                if (use_gui) {
+                    int i = 0;
+                    if (n > 0)
+                        for (i = 0; i < n; i++)
+                            mplNext();
+                    else
+                        for (i = 0; i < -1 * n; i++)
+                            mplPrev();
+                } else
 #endif
-		{
-		    if (!force && mpctx->playtree_iter) {
-			play_tree_iter_t *i =
-			    play_tree_iter_new_copy(mpctx->playtree_iter);
-			if (play_tree_iter_step(i, n, 0) ==
-			    PLAY_TREE_ITER_ENTRY)
-			    mpctx->eof =
-				(n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
-			play_tree_iter_free(i);
-		    } else
-			mpctx->eof = (n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
-		    if (mpctx->eof)
-			mpctx->play_tree_step = n;
-		    brk_cmd = 1;
-		}
-	    }
-	    break;
+                {
+                    if (!force && mpctx->playtree_iter) {
+                        play_tree_iter_t *i =
+                            play_tree_iter_new_copy(mpctx->playtree_iter);
+                        if (play_tree_iter_step(i, n, 0) ==
+                            PLAY_TREE_ITER_ENTRY)
+                            mpctx->eof =
+                                (n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
+                        play_tree_iter_free(i);
+                    } else
+                        mpctx->eof = (n > 0) ? PT_NEXT_ENTRY : PT_PREV_ENTRY;
+                    if (mpctx->eof)
+                        mpctx->play_tree_step = n;
+                    brk_cmd = 1;
+                }
+            }
+            break;
 
-	case MP_CMD_PLAY_TREE_UP_STEP:{
-		int n = cmd->args[0].v.i > 0 ? 1 : -1;
-		int force = cmd->args[1].v.i;
+        case MP_CMD_PLAY_TREE_UP_STEP:{
+                int n = cmd->args[0].v.i > 0 ? 1 : -1;
+                int force = cmd->args[1].v.i;
 
-		if (!force && mpctx->playtree_iter) {
-		    play_tree_iter_t *i =
-			play_tree_iter_new_copy(mpctx->playtree_iter);
-		    if (play_tree_iter_up_step(i, n, 0) == PLAY_TREE_ITER_ENTRY)
-			mpctx->eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
-		    play_tree_iter_free(i);
-		} else
-		    mpctx->eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
-		brk_cmd = 1;
-	    }
-	    break;
+                if (!force && mpctx->playtree_iter) {
+                    play_tree_iter_t *i =
+                        play_tree_iter_new_copy(mpctx->playtree_iter);
+                    if (play_tree_iter_up_step(i, n, 0) == PLAY_TREE_ITER_ENTRY)
+                        mpctx->eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
+                    play_tree_iter_free(i);
+                } else
+                    mpctx->eof = (n > 0) ? PT_UP_NEXT : PT_UP_PREV;
+                brk_cmd = 1;
+            }
+            break;
 
-	case MP_CMD_PLAY_ALT_SRC_STEP:
-	    if (mpctx->playtree_iter && mpctx->playtree_iter->num_files > 1) {
-		int v = cmd->args[0].v.i;
-		if (v > 0
-		    && mpctx->playtree_iter->file <
-		    mpctx->playtree_iter->num_files)
-		    mpctx->eof = PT_NEXT_SRC;
-		else if (v < 0 && mpctx->playtree_iter->file > 1)
-		    mpctx->eof = PT_PREV_SRC;
-	    }
-	    brk_cmd = 1;
-	    break;
+        case MP_CMD_PLAY_ALT_SRC_STEP:
+            if (mpctx->playtree_iter && mpctx->playtree_iter->num_files > 1) {
+                int v = cmd->args[0].v.i;
+                if (v > 0
+                    && mpctx->playtree_iter->file <
+                    mpctx->playtree_iter->num_files)
+                    mpctx->eof = PT_NEXT_SRC;
+                else if (v < 0 && mpctx->playtree_iter->file > 1)
+                    mpctx->eof = PT_PREV_SRC;
+            }
+            brk_cmd = 1;
+            break;
 
-	case MP_CMD_SUB_STEP:
-	    if (sh_video) {
-		int movement = cmd->args[0].v.i;
-		step_sub(subdata, sh_video->pts, movement);
+        case MP_CMD_SUB_STEP:
+            if (sh_video) {
+                int movement = cmd->args[0].v.i;
+                step_sub(subdata, sh_video->pts, movement);
 #ifdef CONFIG_ASS
-		if (ass_track)
-		    sub_delay +=
-			ass_step_sub(ass_track,
-				     (sh_video->pts +
-				      sub_delay) * 1000 + .5, movement) / 1000.;
+                if (ass_track)
+                    sub_delay +=
+                        ass_step_sub(ass_track,
+                                     (sh_video->pts +
+                                      sub_delay) * 1000 + .5, movement) / 1000.;
 #endif
-		set_osd_msg(OSD_MSG_SUB_DELAY, 1, osd_duration,
-			    MSGTR_OSDSubDelay, ROUND(sub_delay * 1000));
-	    }
-	    break;
+                set_osd_msg(OSD_MSG_SUB_DELAY, 1, osd_duration,
+                            MSGTR_OSDSubDelay, ROUND(sub_delay * 1000));
+            }
+            break;
 
-	case MP_CMD_SUB_LOG:
-	    log_sub();
-	    break;
+        case MP_CMD_SUB_LOG:
+            log_sub();
+            break;
 
-	case MP_CMD_OSD:{
-		int v = cmd->args[0].v.i;
-		int max = (term_osd
-			   && !sh_video) ? MAX_TERM_OSD_LEVEL : MAX_OSD_LEVEL;
-		if (osd_level > max)
-		    osd_level = max;
-		if (v < 0)
-		    osd_level = (osd_level + 1) % (max + 1);
-		else
-		    osd_level = v > max ? max : v;
-		/* Show OSD state when disabled, but not when an explicit
-		   argument is given to the OSD command, i.e. in slave mode. */
-		if (v == -1 && osd_level <= 1)
-		    set_osd_msg(OSD_MSG_OSD_STATUS, 0, osd_duration,
-				MSGTR_OSDosd,
-				osd_level ? MSGTR_OSDenabled :
-				MSGTR_OSDdisabled);
-		else
-		    rm_osd_msg(OSD_MSG_OSD_STATUS);
-	    }
-	    break;
+        case MP_CMD_OSD:{
+                int v = cmd->args[0].v.i;
+                int max = (term_osd
+                           && !sh_video) ? MAX_TERM_OSD_LEVEL : MAX_OSD_LEVEL;
+                if (osd_level > max)
+                    osd_level = max;
+                if (v < 0)
+                    osd_level = (osd_level + 1) % (max + 1);
+                else
+                    osd_level = v > max ? max : v;
+                /* Show OSD state when disabled, but not when an explicit
+                   argument is given to the OSD command, i.e. in slave mode. */
+                if (v == -1 && osd_level <= 1)
+                    set_osd_msg(OSD_MSG_OSD_STATUS, 0, osd_duration,
+                                MSGTR_OSDosd,
+                                osd_level ? MSGTR_OSDenabled :
+                                MSGTR_OSDdisabled);
+                else
+                    rm_osd_msg(OSD_MSG_OSD_STATUS);
+            }
+            break;
 
-	case MP_CMD_OSD_SHOW_TEXT:
-	    set_osd_msg(OSD_MSG_TEXT, cmd->args[2].v.i,
-			(cmd->args[1].v.i <
-			 0 ? osd_duration : cmd->args[1].v.i),
-			"%-.63s", cmd->args[0].v.s);
-	    break;
+        case MP_CMD_OSD_SHOW_TEXT:
+            set_osd_msg(OSD_MSG_TEXT, cmd->args[2].v.i,
+                        (cmd->args[1].v.i <
+                         0 ? osd_duration : cmd->args[1].v.i),
+                        "%-.63s", cmd->args[0].v.s);
+            break;
 
-	case MP_CMD_OSD_SHOW_PROPERTY_TEXT:{
-		char *txt = m_properties_expand_string(mp_properties,
-						       cmd->args[0].v.s,
-						       mpctx);
-		/* if no argument supplied take default osd_duration, else <arg> ms. */
-		if (txt) {
-		    set_osd_msg(OSD_MSG_TEXT, cmd->args[2].v.i,
-				(cmd->args[1].v.i <
-				 0 ? osd_duration : cmd->args[1].v.i),
-				"%-.63s", txt);
-		    free(txt);
-		}
-	    }
-	    break;
+        case MP_CMD_OSD_SHOW_PROPERTY_TEXT:{
+                char *txt = m_properties_expand_string(mp_properties,
+                                                       cmd->args[0].v.s,
+                                                       mpctx);
+                /* if no argument supplied take default osd_duration, else <arg> ms. */
+                if (txt) {
+                    set_osd_msg(OSD_MSG_TEXT, cmd->args[2].v.i,
+                                (cmd->args[1].v.i <
+                                 0 ? osd_duration : cmd->args[1].v.i),
+                                "%-.63s", txt);
+                    free(txt);
+                }
+            }
+            break;
 
-	case MP_CMD_LOADFILE:{
-		play_tree_t *e = play_tree_new();
-		play_tree_add_file(e, cmd->args[0].v.s);
+        case MP_CMD_LOADFILE:{
+                play_tree_t *e = play_tree_new();
+                play_tree_add_file(e, cmd->args[0].v.s);
 
-		if (cmd->args[1].v.i)	// append
-		    play_tree_append_entry(mpctx->playtree->child, e);
-		else {
-		    // Go back to the starting point.
-		    while (play_tree_iter_up_step
-			   (mpctx->playtree_iter, 0, 1) != PLAY_TREE_ITER_END)
-			/* NOP */ ;
-		    play_tree_free_list(mpctx->playtree->child, 1);
-		    play_tree_set_child(mpctx->playtree, e);
-		    pt_iter_goto_head(mpctx->playtree_iter);
-		    mpctx->eof = PT_NEXT_SRC;
-		}
-		brk_cmd = 1;
-	    }
-	    break;
+                if (cmd->args[1].v.i)   // append
+                    play_tree_append_entry(mpctx->playtree->child, e);
+                else {
+                    // Go back to the starting point.
+                    while (play_tree_iter_up_step
+                           (mpctx->playtree_iter, 0, 1) != PLAY_TREE_ITER_END)
+                        /* NOP */ ;
+                    play_tree_free_list(mpctx->playtree->child, 1);
+                    play_tree_set_child(mpctx->playtree, e);
+                    pt_iter_goto_head(mpctx->playtree_iter);
+                    mpctx->eof = PT_NEXT_SRC;
+                }
+                brk_cmd = 1;
+            }
+            break;
 
-	case MP_CMD_LOADLIST:{
-		play_tree_t *e = parse_playlist_file(cmd->args[0].v.s);
-		if (!e)
-		    mp_msg(MSGT_CPLAYER, MSGL_ERR,
-			   MSGTR_PlaylistLoadUnable, cmd->args[0].v.s);
-		else {
-		    if (cmd->args[1].v.i)	// append
-			play_tree_append_entry(mpctx->playtree->child, e);
-		    else {
-			// Go back to the starting point.
-			while (play_tree_iter_up_step
-			       (mpctx->playtree_iter, 0, 1)
-			       != PLAY_TREE_ITER_END)
-			    /* NOP */ ;
-			play_tree_free_list(mpctx->playtree->child, 1);
-			play_tree_set_child(mpctx->playtree, e);
-			pt_iter_goto_head(mpctx->playtree_iter);
-			mpctx->eof = PT_NEXT_SRC;
-		    }
-		}
-		brk_cmd = 1;
-	    }
-	    break;
+        case MP_CMD_LOADLIST:{
+                play_tree_t *e = parse_playlist_file(cmd->args[0].v.s);
+                if (!e)
+                    mp_msg(MSGT_CPLAYER, MSGL_ERR,
+                           MSGTR_PlaylistLoadUnable, cmd->args[0].v.s);
+                else {
+                    if (cmd->args[1].v.i)       // append
+                        play_tree_append_entry(mpctx->playtree->child, e);
+                    else {
+                        // Go back to the starting point.
+                        while (play_tree_iter_up_step
+                               (mpctx->playtree_iter, 0, 1)
+                               != PLAY_TREE_ITER_END)
+                            /* NOP */ ;
+                        play_tree_free_list(mpctx->playtree->child, 1);
+                        play_tree_set_child(mpctx->playtree, e);
+                        pt_iter_goto_head(mpctx->playtree_iter);
+                        mpctx->eof = PT_NEXT_SRC;
+                    }
+                }
+                brk_cmd = 1;
+            }
+            break;
 
-	case MP_CMD_STOP:
-	    // Go back to the starting point.
-	    while (play_tree_iter_up_step
-		   (mpctx->playtree_iter, 0, 1) != PLAY_TREE_ITER_END)
-		/* NOP */ ;
-	    mpctx->eof = PT_STOP;
-	    brk_cmd = 1;
-	    break;
+        case MP_CMD_STOP:
+            // Go back to the starting point.
+            while (play_tree_iter_up_step
+                   (mpctx->playtree_iter, 0, 1) != PLAY_TREE_ITER_END)
+                /* NOP */ ;
+            mpctx->eof = PT_STOP;
+            brk_cmd = 1;
+            break;
 
-	case MP_CMD_OSD_SHOW_PROGRESSION:{
-		int len = demuxer_get_time_length(mpctx->demuxer);
-		int pts = demuxer_get_current_time(mpctx->demuxer);
-		set_osd_bar(0, "Position", 0, 100, demuxer_get_percent_pos(mpctx->demuxer));
-		set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
-			    "%c %02d:%02d:%02d / %02d:%02d:%02d",
-			    mpctx->osd_function, pts/3600, (pts/60)%60, pts%60,
-			    len/3600, (len/60)%60, len%60);
-	    }
-	    break;
+        case MP_CMD_OSD_SHOW_PROGRESSION:{
+                int len = demuxer_get_time_length(mpctx->demuxer);
+                int pts = demuxer_get_current_time(mpctx->demuxer);
+                set_osd_bar(0, "Position", 0, 100, demuxer_get_percent_pos(mpctx->demuxer));
+                set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
+                            "%c %02d:%02d:%02d / %02d:%02d:%02d",
+                            mpctx->osd_function, pts/3600, (pts/60)%60, pts%60,
+                            len/3600, (len/60)%60, len%60);
+            }
+            break;
 
 #ifdef CONFIG_RADIO
-	case MP_CMD_RADIO_STEP_CHANNEL:
-	    if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {
-		int v = cmd->args[0].v.i;
-		if (v > 0)
-		    radio_step_channel(mpctx->demuxer->stream,
-				       RADIO_CHANNEL_HIGHER);
-		else
-		    radio_step_channel(mpctx->demuxer->stream,
-				       RADIO_CHANNEL_LOWER);
-		if (radio_get_channel_name(mpctx->demuxer->stream)) {
-		    set_osd_msg(OSD_MSG_RADIO_CHANNEL, 1, osd_duration,
-				MSGTR_OSDChannel,
-				radio_get_channel_name(mpctx->demuxer->stream));
-		}
-	    }
-	    break;
+        case MP_CMD_RADIO_STEP_CHANNEL:
+            if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {
+                int v = cmd->args[0].v.i;
+                if (v > 0)
+                    radio_step_channel(mpctx->demuxer->stream,
+                                       RADIO_CHANNEL_HIGHER);
+                else
+                    radio_step_channel(mpctx->demuxer->stream,
+                                       RADIO_CHANNEL_LOWER);
+                if (radio_get_channel_name(mpctx->demuxer->stream)) {
+                    set_osd_msg(OSD_MSG_RADIO_CHANNEL, 1, osd_duration,
+                                MSGTR_OSDChannel,
+                                radio_get_channel_name(mpctx->demuxer->stream));
+                }
+            }
+            break;
 
-	case MP_CMD_RADIO_SET_CHANNEL:
-	    if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {
-		radio_set_channel(mpctx->demuxer->stream, cmd->args[0].v.s);
-		if (radio_get_channel_name(mpctx->demuxer->stream)) {
-		    set_osd_msg(OSD_MSG_RADIO_CHANNEL, 1, osd_duration,
-				MSGTR_OSDChannel,
-				radio_get_channel_name(mpctx->demuxer->stream));
-		}
-	    }
-	    break;
+        case MP_CMD_RADIO_SET_CHANNEL:
+            if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {
+                radio_set_channel(mpctx->demuxer->stream, cmd->args[0].v.s);
+                if (radio_get_channel_name(mpctx->demuxer->stream)) {
+                    set_osd_msg(OSD_MSG_RADIO_CHANNEL, 1, osd_duration,
+                                MSGTR_OSDChannel,
+                                radio_get_channel_name(mpctx->demuxer->stream));
+                }
+            }
+            break;
 
-	case MP_CMD_RADIO_SET_FREQ:
-	    if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO)
-		radio_set_freq(mpctx->demuxer->stream, cmd->args[0].v.f);
-	    break;
+        case MP_CMD_RADIO_SET_FREQ:
+            if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO)
+                radio_set_freq(mpctx->demuxer->stream, cmd->args[0].v.f);
+            break;
 
-	case MP_CMD_RADIO_STEP_FREQ:
-	    if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO)
-		radio_step_freq(mpctx->demuxer->stream, cmd->args[0].v.f);
-	    break;
+        case MP_CMD_RADIO_STEP_FREQ:
+            if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO)
+                radio_step_freq(mpctx->demuxer->stream, cmd->args[0].v.f);
+            break;
 #endif
 
 #ifdef CONFIG_TV
-	case MP_CMD_TV_START_SCAN:
-	    if (mpctx->file_format == DEMUXER_TYPE_TV)
-		tv_start_scan((tvi_handle_t *) (mpctx->demuxer->priv),1);
-	    break;
-	case MP_CMD_TV_SET_FREQ:
-	    if (mpctx->file_format == DEMUXER_TYPE_TV)
-		tv_set_freq((tvi_handle_t *) (mpctx->demuxer->priv),
-			    cmd->args[0].v.f * 16.0);
+        case MP_CMD_TV_START_SCAN:
+            if (mpctx->file_format == DEMUXER_TYPE_TV)
+                tv_start_scan((tvi_handle_t *) (mpctx->demuxer->priv),1);
+            break;
+        case MP_CMD_TV_SET_FREQ:
+            if (mpctx->file_format == DEMUXER_TYPE_TV)
+                tv_set_freq((tvi_handle_t *) (mpctx->demuxer->priv),
+                            cmd->args[0].v.f * 16.0);
 #ifdef CONFIG_PVR
             else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) {
               pvr_set_freq (mpctx->stream, ROUND (cmd->args[0].v.f));
@@ -2831,12 +2831,12 @@ int run_command(MPContext * mpctx, mp_cm
                            pvr_get_current_stationname (mpctx->stream));
             }
 #endif /* CONFIG_PVR */
-	    break;
+            break;
 
-	case MP_CMD_TV_STEP_FREQ:
-	    if (mpctx->file_format == DEMUXER_TYPE_TV)
-		tv_step_freq((tvi_handle_t *) (mpctx->demuxer->priv),
-			    cmd->args[0].v.f * 16.0);
+        case MP_CMD_TV_STEP_FREQ:
+            if (mpctx->file_format == DEMUXER_TYPE_TV)
+                tv_step_freq((tvi_handle_t *) (mpctx->demuxer->priv),
+                            cmd->args[0].v.f * 16.0);
 #ifdef CONFIG_PVR
             else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) {
               pvr_force_freq_step (mpctx->stream, ROUND (cmd->args[0].v.f));
@@ -2845,32 +2845,32 @@ int run_command(MPContext * mpctx, mp_cm
                            pvr_get_current_frequency (mpctx->stream));
             }
 #endif /* CONFIG_PVR */
-	    break;
+            break;
 
-	case MP_CMD_TV_SET_NORM:
-	    if (mpctx->file_format == DEMUXER_TYPE_TV)
-		tv_set_norm((tvi_handle_t *) (mpctx->demuxer->priv),
-			    cmd->args[0].v.s);
-	    break;
+        case MP_CMD_TV_SET_NORM:
+            if (mpctx->file_format == DEMUXER_TYPE_TV)
+                tv_set_norm((tvi_handle_t *) (mpctx->demuxer->priv),
+                            cmd->args[0].v.s);
+            break;
 
-	case MP_CMD_TV_STEP_CHANNEL:{
-		if (mpctx->file_format == DEMUXER_TYPE_TV) {
-		    int v = cmd->args[0].v.i;
-		    if (v > 0) {
-			tv_step_channel((tvi_handle_t *) (mpctx->
-							  demuxer->priv),
-					TV_CHANNEL_HIGHER);
-		    } else {
-			tv_step_channel((tvi_handle_t *) (mpctx->
-							  demuxer->priv),
-					TV_CHANNEL_LOWER);
-		    }
-		    if (tv_channel_list) {
-			set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration,
-				    MSGTR_OSDChannel, tv_channel_current->name);
-			//vo_osd_changed(OSDTYPE_SUBTITLE);
-		    }
-		}
+        case MP_CMD_TV_STEP_CHANNEL:{
+                if (mpctx->file_format == DEMUXER_TYPE_TV) {
+                    int v = cmd->args[0].v.i;
+                    if (v > 0) {
+                        tv_step_channel((tvi_handle_t *) (mpctx->
+                                                          demuxer->priv),
+                                        TV_CHANNEL_HIGHER);
+                    } else {
+                        tv_step_channel((tvi_handle_t *) (mpctx->
+                                                          demuxer->priv),
+                                        TV_CHANNEL_LOWER);
+                    }
+                    if (tv_channel_list) {
+                        set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration,
+                                    MSGTR_OSDChannel, tv_channel_current->name);
+                        //vo_osd_changed(OSDTYPE_SUBTITLE);
+                    }
+                }
 #ifdef CONFIG_PVR
                 else if (mpctx->stream &&
                          mpctx->stream->type == STREAMTYPE_PVR) {
@@ -2880,35 +2880,35 @@ int run_command(MPContext * mpctx, mp_cm
                                pvr_get_current_stationname (mpctx->stream));
                 }
 #endif /* CONFIG_PVR */
-	    }
+            }
 #ifdef CONFIG_DVBIN
-	    if (mpctx->stream->type == STREAMTYPE_DVB) {
-		    int dir;
-		    int v = cmd->args[0].v.i;
+            if (mpctx->stream->type == STREAMTYPE_DVB) {
+                    int dir;
+                    int v = cmd->args[0].v.i;
 
-		    mpctx->last_dvb_step = v;
-		    if (v > 0)
-			dir = DVB_CHANNEL_HIGHER;
-		    else
-			dir = DVB_CHANNEL_LOWER;
+                    mpctx->last_dvb_step = v;
+                    if (v > 0)
+                        dir = DVB_CHANNEL_HIGHER;
+                    else
+                        dir = DVB_CHANNEL_LOWER;
 
 
-		    if (dvb_step_channel(mpctx->stream, dir))
-			mpctx->eof = mpctx->dvbin_reopen = 1;
-	    }
+                    if (dvb_step_channel(mpctx->stream, dir))
+                        mpctx->eof = mpctx->dvbin_reopen = 1;
+            }
 #endif /* CONFIG_DVBIN */
-	    break;
+            break;
 
-	case MP_CMD_TV_SET_CHANNEL:
-	    if (mpctx->file_format == DEMUXER_TYPE_TV) {
-		tv_set_channel((tvi_handle_t *) (mpctx->demuxer->priv),
-			       cmd->args[0].v.s);
-		if (tv_channel_list) {
-		    set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration,
-				MSGTR_OSDChannel, tv_channel_current->name);
-		    //vo_osd_changed(OSDTYPE_SUBTITLE);
-		}
-	    }
+        case MP_CMD_TV_SET_CHANNEL:
+            if (mpctx->file_format == DEMUXER_TYPE_TV) {
+                tv_set_channel((tvi_handle_t *) (mpctx->demuxer->priv),
+                               cmd->args[0].v.s);
+                if (tv_channel_list) {
+                    set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration,
+                                MSGTR_OSDChannel, tv_channel_current->name);
+                    //vo_osd_changed(OSDTYPE_SUBTITLE);
+                }
+            }
 #ifdef CONFIG_PVR
             else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) {
               pvr_set_channel (mpctx->stream, cmd->args[0].v.s);
@@ -2917,29 +2917,29 @@ int run_command(MPContext * mpctx, mp_cm
                            pvr_get_current_stationname (mpctx->stream));
             }
 #endif /* CONFIG_PVR */
-	    break;
+            break;
 
 #ifdef CONFIG_DVBIN
-	case MP_CMD_DVB_SET_CHANNEL:
-	    if (mpctx->stream->type == STREAMTYPE_DVB) {
-			mpctx->last_dvb_step = 1;
+        case MP_CMD_DVB_SET_CHANNEL:
+            if (mpctx->stream->type == STREAMTYPE_DVB) {
+                        mpctx->last_dvb_step = 1;
 
-		    if (dvb_set_channel
-			(mpctx->stream, cmd->args[1].v.i, cmd->args[0].v.i))
-			mpctx->eof = mpctx->dvbin_reopen = 1;
-	    }
-	    break;
+                    if (dvb_set_channel
+                        (mpctx->stream, cmd->args[1].v.i, cmd->args[0].v.i))
+                        mpctx->eof = mpctx->dvbin_reopen = 1;
+            }
+            break;
 #endif /* CONFIG_DVBIN */
 
-	case MP_CMD_TV_LAST_CHANNEL:
-	    if (mpctx->file_format == DEMUXER_TYPE_TV) {
-		tv_last_channel((tvi_handle_t *) (mpctx->demuxer->priv));
-		if (tv_channel_list) {
-		    set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration,
-				MSGTR_OSDChannel, tv_channel_current->name);
-		    //vo_osd_changed(OSDTYPE_SUBTITLE);
-		}
-	    }
+        case MP_CMD_TV_LAST_CHANNEL:
+            if (mpctx->file_format == DEMUXER_TYPE_TV) {
+                tv_last_channel((tvi_handle_t *) (mpctx->demuxer->priv));
+                if (tv_channel_list) {
+                    set_osd_msg(OSD_MSG_TV_CHANNEL, 1, osd_duration,
+                                MSGTR_OSDChannel, tv_channel_current->name);
+                    //vo_osd_changed(OSDTYPE_SUBTITLE);
+                }
+            }
 #ifdef CONFIG_PVR
             else if (mpctx->stream && mpctx->stream->type == STREAMTYPE_PVR) {
               pvr_set_lastchannel (mpctx->stream);
@@ -2948,297 +2948,297 @@ int run_command(MPContext * mpctx, mp_cm
                            pvr_get_current_stationname (mpctx->stream));
             }
 #endif /* CONFIG_PVR */
-	    break;
+            break;
 
-	case MP_CMD_TV_STEP_NORM:
-	    if (mpctx->file_format == DEMUXER_TYPE_TV)
-		tv_step_norm((tvi_handle_t *) (mpctx->demuxer->priv));
-	    break;
+        case MP_CMD_TV_STEP_NORM:
+            if (mpctx->file_format == DEMUXER_TYPE_TV)
+                tv_step_norm((tvi_handle_t *) (mpctx->demuxer->priv));
+            break;
 
-	case MP_CMD_TV_STEP_CHANNEL_LIST:
-	    if (mpctx->file_format == DEMUXER_TYPE_TV)
-		tv_step_chanlist((tvi_handle_t *) (mpctx->demuxer->priv));
-	    break;
+        case MP_CMD_TV_STEP_CHANNEL_LIST:
+            if (mpctx->file_format == DEMUXER_TYPE_TV)
+                tv_step_chanlist((tvi_handle_t *) (mpctx->demuxer->priv));
+            break;
 #endif /* CONFIG_TV */
-	case MP_CMD_TV_TELETEXT_ADD_DEC:
-	{
-	    if (mpctx->demuxer->teletext)
-	        teletext_control(mpctx->demuxer->teletext,TV_VBI_CONTROL_ADD_DEC,
-	                         &(cmd->args[0].v.s));
-	    break;
-	}
-	case MP_CMD_TV_TELETEXT_GO_LINK:
-	{
-	    if (mpctx->demuxer->teletext)
-	        teletext_control(mpctx->demuxer->teletext,TV_VBI_CONTROL_GO_LINK,
-	                         &(cmd->args[0].v.i));
-	    break;
-	}
+        case MP_CMD_TV_TELETEXT_ADD_DEC:
+        {
+            if (mpctx->demuxer->teletext)
+                teletext_control(mpctx->demuxer->teletext,TV_VBI_CONTROL_ADD_DEC,
+                                 &(cmd->args[0].v.s));
+            break;
+        }
+        case MP_CMD_TV_TELETEXT_GO_LINK:
+        {
+            if (mpctx->demuxer->teletext)
+                teletext_control(mpctx->demuxer->teletext,TV_VBI_CONTROL_GO_LINK,
+                                 &(cmd->args[0].v.i));
+            break;
+        }
 
-	case MP_CMD_SUB_LOAD:
-	    if (sh_video) {
-		int n = mpctx->set_of_sub_size;
-		add_subtitles(cmd->args[0].v.s, sh_video->fps, 0);
-		if (n != mpctx->set_of_sub_size) {
-		    if (mpctx->global_sub_indices[SUB_SOURCE_SUBS] < 0)
-			mpctx->global_sub_indices[SUB_SOURCE_SUBS] =
-			    mpctx->global_sub_size;
-		    ++mpctx->global_sub_size;
-		}
-	    }
-	    break;
+        case MP_CMD_SUB_LOAD:
+            if (sh_video) {
+                int n = mpctx->set_of_sub_size;
+                add_subtitles(cmd->args[0].v.s, sh_video->fps, 0);
+                if (n != mpctx->set_of_sub_size) {
+                    if (mpctx->global_sub_indices[SUB_SOURCE_SUBS] < 0)
+                        mpctx->global_sub_indices[SUB_SOURCE_SUBS] =
+                            mpctx->global_sub_size;
+                    ++mpctx->global_sub_size;
+                }
+            }
+            break;
 
-	case MP_CMD_SUB_REMOVE:
-	    if (sh_video) {
-		int v = cmd->args[0].v.i;
-		if (v < 0) {
-		    remove_subtitle_range(mpctx, 0, mpctx->set_of_sub_size);
-		} else if (v < mpctx->set_of_sub_size) {
-		    remove_subtitle_range(mpctx, v, 1);
-		}
-	    }
-	    break;
+        case MP_CMD_SUB_REMOVE:
+            if (sh_video) {
+                int v = cmd->args[0].v.i;
+                if (v < 0) {
+                    remove_subtitle_range(mpctx, 0, mpctx->set_of_sub_size);
+                } else if (v < mpctx->set_of_sub_size) {
+                    remove_subtitle_range(mpctx, v, 1);
+                }
+            }
+            break;
 
-	case MP_CMD_GET_SUB_VISIBILITY:
-	    if (sh_video) {
-		mp_msg(MSGT_GLOBAL, MSGL_INFO,
-		       "ANS_SUB_VISIBILITY=%d\n", sub_visibility);
-	    }
-	    break;
+        case MP_CMD_GET_SUB_VISIBILITY:
+            if (sh_video) {
+                mp_msg(MSGT_GLOBAL, MSGL_INFO,
+                       "ANS_SUB_VISIBILITY=%d\n", sub_visibility);
+            }
+            break;
 
-	case MP_CMD_SCREENSHOT:
-	    if (vo_config_count) {
-		mp_msg(MSGT_CPLAYER, MSGL_INFO, "sending VFCTRL_SCREENSHOT!\n");
-		if (CONTROL_OK !=
-		    ((vf_instance_t *) sh_video->vfilter)->
-		    control(sh_video->vfilter, VFCTRL_SCREENSHOT,
-			    &cmd->args[0].v.i))
-		    mp_msg(MSGT_CPLAYER, MSGL_INFO, "failed (forgot -vf screenshot?)\n");
-	    }
-	    break;
+        case MP_CMD_SCREENSHOT:
+            if (vo_config_count) {
+                mp_msg(MSGT_CPLAYER, MSGL_INFO, "sending VFCTRL_SCREENSHOT!\n");
+                if (CONTROL_OK !=
+                    ((vf_instance_t *) sh_video->vfilter)->
+                    control(sh_video->vfilter, VFCTRL_SCREENSHOT,
+                            &cmd->args[0].v.i))
+                    mp_msg(MSGT_CPLAYER, MSGL_INFO, "failed (forgot -vf screenshot?)\n");
+            }
+            break;
 
-	case MP_CMD_VF_CHANGE_RECTANGLE:
+        case MP_CMD_VF_CHANGE_RECTANGLE:
             if (!sh_video)
                 break;
-	    set_rectangle(sh_video, cmd->args[0].v.i, cmd->args[1].v.i);
-	    break;
+            set_rectangle(sh_video, cmd->args[0].v.i, cmd->args[1].v.i);
+            break;
 
-	case MP_CMD_GET_TIME_LENGTH:{
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_LENGTH=%.2lf\n",
-		       demuxer_get_time_length(mpctx->demuxer));
-	    }
-	    break;
+        case MP_CMD_GET_TIME_LENGTH:{
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_LENGTH=%.2lf\n",
+                       demuxer_get_time_length(mpctx->demuxer));
+            }
+            break;
 
-	case MP_CMD_GET_FILENAME:{
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_FILENAME='%s'\n",
-		       get_metadata(META_NAME));
-	    }
-	    break;
+        case MP_CMD_GET_FILENAME:{
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_FILENAME='%s'\n",
+                       get_metadata(META_NAME));
+            }
+            break;
 
-	case MP_CMD_GET_VIDEO_CODEC:{
-		char *inf = get_metadata(META_VIDEO_CODEC);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_VIDEO_CODEC='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_VIDEO_CODEC:{
+                char *inf = get_metadata(META_VIDEO_CODEC);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_VIDEO_CODEC='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_VIDEO_BITRATE:{
-		char *inf = get_metadata(META_VIDEO_BITRATE);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_VIDEO_BITRATE='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_VIDEO_BITRATE:{
+                char *inf = get_metadata(META_VIDEO_BITRATE);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_VIDEO_BITRATE='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_VIDEO_RESOLUTION:{
-		char *inf = get_metadata(META_VIDEO_RESOLUTION);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO,
-		       "ANS_VIDEO_RESOLUTION='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_VIDEO_RESOLUTION:{
+                char *inf = get_metadata(META_VIDEO_RESOLUTION);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO,
+                       "ANS_VIDEO_RESOLUTION='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_AUDIO_CODEC:{
-		char *inf = get_metadata(META_AUDIO_CODEC);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_AUDIO_CODEC='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_AUDIO_CODEC:{
+                char *inf = get_metadata(META_AUDIO_CODEC);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_AUDIO_CODEC='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_AUDIO_BITRATE:{
-		char *inf = get_metadata(META_AUDIO_BITRATE);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_AUDIO_BITRATE='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_AUDIO_BITRATE:{
+                char *inf = get_metadata(META_AUDIO_BITRATE);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_AUDIO_BITRATE='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_AUDIO_SAMPLES:{
-		char *inf = get_metadata(META_AUDIO_SAMPLES);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_AUDIO_SAMPLES='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_AUDIO_SAMPLES:{
+                char *inf = get_metadata(META_AUDIO_SAMPLES);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_AUDIO_SAMPLES='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_META_TITLE:{
-		char *inf = get_metadata(META_INFO_TITLE);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_TITLE='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_META_TITLE:{
+                char *inf = get_metadata(META_INFO_TITLE);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_TITLE='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_META_ARTIST:{
-		char *inf = get_metadata(META_INFO_ARTIST);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_ARTIST='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_META_ARTIST:{
+                char *inf = get_metadata(META_INFO_ARTIST);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_ARTIST='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_META_ALBUM:{
-		char *inf = get_metadata(META_INFO_ALBUM);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_ALBUM='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_META_ALBUM:{
+                char *inf = get_metadata(META_INFO_ALBUM);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_ALBUM='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_META_YEAR:{
-		char *inf = get_metadata(META_INFO_YEAR);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_YEAR='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_META_YEAR:{
+                char *inf = get_metadata(META_INFO_YEAR);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_YEAR='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_META_COMMENT:{
-		char *inf = get_metadata(META_INFO_COMMENT);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_COMMENT='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_META_COMMENT:{
+                char *inf = get_metadata(META_INFO_COMMENT);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_COMMENT='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_META_TRACK:{
-		char *inf = get_metadata(META_INFO_TRACK);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_TRACK='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_META_TRACK:{
+                char *inf = get_metadata(META_INFO_TRACK);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_TRACK='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_META_GENRE:{
-		char *inf = get_metadata(META_INFO_GENRE);
-		if (!inf)
-		    inf = strdup("");
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_GENRE='%s'\n", inf);
-		free(inf);
-	    }
-	    break;
+        case MP_CMD_GET_META_GENRE:{
+                char *inf = get_metadata(META_INFO_GENRE);
+                if (!inf)
+                    inf = strdup("");
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_META_GENRE='%s'\n", inf);
+                free(inf);
+            }
+            break;
 
-	case MP_CMD_GET_VO_FULLSCREEN:
-	    if (mpctx->video_out && vo_config_count)
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_VO_FULLSCREEN=%d\n", vo_fs);
-	    break;
+        case MP_CMD_GET_VO_FULLSCREEN:
+            if (mpctx->video_out && vo_config_count)
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_VO_FULLSCREEN=%d\n", vo_fs);
+            break;
 
-	case MP_CMD_GET_PERCENT_POS:
-	    mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_PERCENT_POSITION=%d\n",
-		   demuxer_get_percent_pos(mpctx->demuxer));
-	    break;
+        case MP_CMD_GET_PERCENT_POS:
+            mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_PERCENT_POSITION=%d\n",
+                   demuxer_get_percent_pos(mpctx->demuxer));
+            break;
 
-	case MP_CMD_GET_TIME_POS:{
-		float pos = 0;
-		if (sh_video)
-		    pos = sh_video->pts;
-		else if (sh_audio && mpctx->audio_out)
-		    pos =
-			playing_audio_pts(sh_audio, mpctx->d_audio,
-					  mpctx->audio_out);
-		mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_TIME_POSITION=%.1f\n", pos);
-	    }
-	    break;
+        case MP_CMD_GET_TIME_POS:{
+                float pos = 0;
+                if (sh_video)
+                    pos = sh_video->pts;
+                else if (sh_audio && mpctx->audio_out)
+                    pos =
+                        playing_audio_pts(sh_audio, mpctx->d_audio,
+                                          mpctx->audio_out);
+                mp_msg(MSGT_GLOBAL, MSGL_INFO, "ANS_TIME_POSITION=%.1f\n", pos);
+            }
+            break;
 
-	case MP_CMD_RUN:
+        case MP_CMD_RUN:
 #ifndef __MINGW32__
-	    if (!fork()) {
-		execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, NULL);
-		exit(0);
-	    }
+            if (!fork()) {
+                execl("/bin/sh", "sh", "-c", cmd->args[0].v.s, NULL);
+                exit(0);
+            }
 #endif
-	    break;
+            break;
 
-	case MP_CMD_KEYDOWN_EVENTS:
-	    mplayer_put_key(cmd->args[0].v.i);
-	    break;
+        case MP_CMD_KEYDOWN_EVENTS:
+            mplayer_put_key(cmd->args[0].v.i);
+            break;
 
-	case MP_CMD_SET_MOUSE_POS:{
-		int pointer_x, pointer_y;
-		double dx, dy;
-		pointer_x = cmd->args[0].v.i;
-		pointer_y = cmd->args[1].v.i;
-		rescale_input_coordinates(pointer_x, pointer_y, &dx, &dy);
+        case MP_CMD_SET_MOUSE_POS:{
+                int pointer_x, pointer_y;
+                double dx, dy;
+                pointer_x = cmd->args[0].v.i;
+                pointer_y = cmd->args[1].v.i;
+                rescale_input_coordinates(pointer_x, pointer_y, &dx, &dy);
 #ifdef CONFIG_DVDNAV
-		if (mpctx->stream->type == STREAMTYPE_DVDNAV
-		    && dx > 0.0 && dy > 0.0) {
-		    int button = -1;
-		    pointer_x = (int) (dx * (double) sh_video->disp_w);
-		    pointer_y = (int) (dy * (double) sh_video->disp_h);
-		    mp_dvdnav_update_mouse_pos(mpctx->stream,
-					       pointer_x, pointer_y, &button);
-		    if (osd_level > 1 && button > 0)
-			set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
-				    "Selected button number %d", button);
-		}
+                if (mpctx->stream->type == STREAMTYPE_DVDNAV
+                    && dx > 0.0 && dy > 0.0) {
+                    int button = -1;
+                    pointer_x = (int) (dx * (double) sh_video->disp_w);
+                    pointer_y = (int) (dy * (double) sh_video->disp_h);
+                    mp_dvdnav_update_mouse_pos(mpctx->stream,
+                                               pointer_x, pointer_y, &button);
+                    if (osd_level > 1 && button > 0)
+                        set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
+                                    "Selected button number %d", button);
+                }
 #endif
 #ifdef CONFIG_MENU
-		if (use_menu && dx >= 0.0 && dy >= 0.0)
-		    menu_update_mouse_pos(dx, dy);
+                if (use_menu && dx >= 0.0 && dy >= 0.0)
+                    menu_update_mouse_pos(dx, dy);
 #endif
-	    }
-	    break;
+            }
+            break;
 
 #ifdef CONFIG_DVDNAV
-	case MP_CMD_DVDNAV:{
-		int button = -1;
-		int i;
-		mp_command_type command = 0;
-		if (mpctx->stream->type != STREAMTYPE_DVDNAV)
-		    break;
+        case MP_CMD_DVDNAV:{
+                int button = -1;
+                int i;
+                mp_command_type command = 0;
+                if (mpctx->stream->type != STREAMTYPE_DVDNAV)
+                    break;
 
-		for (i = 0; mp_dvdnav_bindings[i].name; i++)
-		  if (cmd->args[0].v.s &&
-		      !strcasecmp (cmd->args[0].v.s,
-		                   mp_dvdnav_bindings[i].name))
-		    command = mp_dvdnav_bindings[i].cmd;
+                for (i = 0; mp_dvdnav_bindings[i].name; i++)
+                  if (cmd->args[0].v.s &&
+                      !strcasecmp (cmd->args[0].v.s,
+                                   mp_dvdnav_bindings[i].name))
+                    command = mp_dvdnav_bindings[i].cmd;
 
-		mp_dvdnav_handle_input(mpctx->stream,command,&button);
-		if (osd_level > 1 && button > 0)
-		    set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
-				"Selected button number %d", button);
-	    }
-	    break;
+                mp_dvdnav_handle_input(mpctx->stream,command,&button);
+                if (osd_level > 1 && button > 0)
+                    set_osd_msg(OSD_MSG_TEXT, 1, osd_duration,
+                                "Selected button number %d", button);
+            }
+            break;
 
-	case MP_CMD_SWITCH_TITLE:
-	    if (mpctx->stream->type == STREAMTYPE_DVDNAV)
-	        mp_dvdnav_switch_title(mpctx->stream, cmd->args[0].v.i);
-	    break;
+        case MP_CMD_SWITCH_TITLE:
+            if (mpctx->stream->type == STREAMTYPE_DVDNAV)
+                mp_dvdnav_switch_title(mpctx->stream, cmd->args[0].v.i);
+            break;
 
 #endif
 
@@ -3279,30 +3279,30 @@ int run_command(MPContext * mpctx, mp_cm
         af_init(mpctx->mixer.afilter);
         build_afilter_chain(sh_audio, &ao_data);
         break;
-	default:
+        default:
 #ifdef CONFIG_GUI
-	    if ((use_gui) && (cmd->id > MP_CMD_GUI_EVENTS))
-		guiGetEvent(guiIEvent, (char *) cmd->id);
-	    else
+            if ((use_gui) && (cmd->id > MP_CMD_GUI_EVENTS))
+                guiGetEvent(guiIEvent, (char *) cmd->id);
+            else
 #endif
-		mp_msg(MSGT_CPLAYER, MSGL_V,
-		       "Received unknown cmd %s\n", cmd->name);
-	}
+                mp_msg(MSGT_CPLAYER, MSGL_V,
+                       "Received unknown cmd %s\n", cmd->name);
+        }
 
     switch (cmd->pausing) {
-    case 1:	// "pausing"
-	mpctx->osd_function = OSD_PAUSE;
-	break;
-    case 3:	// "pausing_toggle"
-	mpctx->was_paused = !mpctx->was_paused;
-	if (mpctx->was_paused)
-	    mpctx->osd_function = OSD_PAUSE;
-	else if (mpctx->osd_function == OSD_PAUSE)
-	    mpctx->osd_function = OSD_PLAY;
-	break;
-    case 2:	// "pausing_keep"
-	if (mpctx->was_paused)
-	    mpctx->osd_function = OSD_PAUSE;
+    case 1:     // "pausing"
+        mpctx->osd_function = OSD_PAUSE;
+        break;
+    case 3:     // "pausing_toggle"
+        mpctx->was_paused = !mpctx->was_paused;
+        if (mpctx->was_paused)
+            mpctx->osd_function = OSD_PAUSE;
+        else if (mpctx->osd_function == OSD_PAUSE)
+            mpctx->osd_function = OSD_PLAY;
+        break;
+    case 2:     // "pausing_keep"
+        if (mpctx->was_paused)
+            mpctx->osd_function = OSD_PAUSE;
     }
     return brk_cmd;
 }

Modified: trunk/cpudetect.c
==============================================================================
--- trunk/cpudetect.c	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/cpudetect.c	Tue May  4 01:34:38 2010	(r31134)
@@ -63,29 +63,29 @@ static int has_cpuid(void)
 #if ARCH_X86_64
    return 1;
 #else
-	long a, c;
-    __asm__ volatile (
-                          /* See if CPUID instruction is supported ... */
-                          /* ... Get copies of EFLAGS into eax and ecx */
-                          "pushfl\n\t"
-                          "pop %0\n\t"
-                          "mov %0, %1\n\t"
+   long a, c;
+   __asm__ volatile (
+       /* See if CPUID instruction is supported ... */
+       /* ... Get copies of EFLAGS into eax and ecx */
+       "pushfl\n\t"
+       "pop %0\n\t"
+       "mov %0, %1\n\t"
 
-                          /* ... Toggle the ID bit in one copy and store */
-                          /*     to the EFLAGS reg */
-                          "xor $0x200000, %0\n\t"
-                          "push %0\n\t"
-                          "popfl\n\t"
+       /* ... Toggle the ID bit in one copy and store */
+       /*     to the EFLAGS reg */
+       "xor $0x200000, %0\n\t"
+       "push %0\n\t"
+       "popfl\n\t"
 
-                          /* ... Get the (hopefully modified) EFLAGS */
-                          "pushfl\n\t"
-                          "pop %0\n\t"
-                          : "=a" (a), "=c" (c)
-                          :
-                          : "cc"
-                          );
+       /* ... Get the (hopefully modified) EFLAGS */
+       "pushfl\n\t"
+       "pop %0\n\t"
+       : "=a" (a), "=c" (c)
+       :
+       : "cc"
+       );
 
-	return a != c;
+   return a != c;
 #endif
 }
 
@@ -93,168 +93,167 @@ static void
 do_cpuid(unsigned int ax, unsigned int *p)
 {
 #if 0
-	__asm__ volatile(
-	"cpuid;"
-	: "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3])
-	:  "0" (ax)
-	);
+    __asm__ volatile(
+        "cpuid;"
+        : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3])
+        :  "0" (ax)
+        );
 #else
 // code from libavcodec:
     __asm__ volatile
-	("mov %%"REG_b", %%"REG_S"\n\t"
+        ("mov %%"REG_b", %%"REG_S"\n\t"
          "cpuid\n\t"
          "xchg %%"REG_b", %%"REG_S
          : "=a" (p[0]), "=S" (p[1]),
            "=c" (p[2]), "=d" (p[3])
          : "0" (ax));
 #endif
-
 }
 
 void GetCpuCaps( CpuCaps *caps)
 {
-	unsigned int regs[4];
-	unsigned int regs2[4];
+    unsigned int regs[4];
+    unsigned int regs2[4];
 
-	memset(caps, 0, sizeof(*caps));
-	caps->isX86=1;
-	caps->cl_size=32; /* default */
-	if (!has_cpuid()) {
-	    mp_msg(MSGT_CPUDETECT,MSGL_WARN,"CPUID not supported!??? (maybe an old 486?)\n");
-	    return;
-	}
-	do_cpuid(0x00000000, regs); // get _max_ cpuid level and vendor name
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU vendor name: %.4s%.4s%.4s  max cpuid level: %d\n",
-			(char*) (regs+1),(char*) (regs+3),(char*) (regs+2), regs[0]);
-	if (regs[0]>=0x00000001)
-	{
-		char *tmpstr, *ptmpstr;
-		unsigned cl_size;
+    memset(caps, 0, sizeof(*caps));
+    caps->isX86=1;
+    caps->cl_size=32; /* default */
+    if (!has_cpuid()) {
+        mp_msg(MSGT_CPUDETECT,MSGL_WARN,"CPUID not supported!??? (maybe an old 486?)\n");
+        return;
+    }
+    do_cpuid(0x00000000, regs); // get _max_ cpuid level and vendor name
+    mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU vendor name: %.4s%.4s%.4s  max cpuid level: %d\n",
+            (char*) (regs+1),(char*) (regs+3),(char*) (regs+2), regs[0]);
+    if (regs[0]>=0x00000001)
+    {
+        char *tmpstr, *ptmpstr;
+        unsigned cl_size;
 
-		do_cpuid(0x00000001, regs2);
+        do_cpuid(0x00000001, regs2);
 
-		caps->cpuType=(regs2[0] >> 8)&0xf;
-		caps->cpuModel=(regs2[0] >> 4)&0xf;
+        caps->cpuType=(regs2[0] >> 8)&0xf;
+        caps->cpuModel=(regs2[0] >> 4)&0xf;
 
 // see AMD64 Architecture Programmer's Manual, Volume 3: General-purpose and
 // System Instructions, Table 3-2: Effective family computation, page 120.
-		if(caps->cpuType==0xf){
-		    // use extended family (P4, IA64, K8)
-		    caps->cpuType=0xf+((regs2[0]>>20)&255);
-		}
-		if(caps->cpuType==0xf || caps->cpuType==6)
-		    caps->cpuModel |= ((regs2[0]>>16)&0xf) << 4;
+        if(caps->cpuType==0xf){
+            // use extended family (P4, IA64, K8)
+            caps->cpuType=0xf+((regs2[0]>>20)&255);
+        }
+        if(caps->cpuType==0xf || caps->cpuType==6)
+            caps->cpuModel |= ((regs2[0]>>16)&0xf) << 4;
 
-		caps->cpuStepping=regs2[0] & 0xf;
+        caps->cpuStepping=regs2[0] & 0xf;
 
-		// general feature flags:
-		caps->hasTSC  = (regs2[3] & (1 << 8  )) >>  8; // 0x0000010
-		caps->hasMMX  = (regs2[3] & (1 << 23 )) >> 23; // 0x0800000
-		caps->hasSSE  = (regs2[3] & (1 << 25 )) >> 25; // 0x2000000
-		caps->hasSSE2 = (regs2[3] & (1 << 26 )) >> 26; // 0x4000000
-		caps->hasSSE3 = (regs2[2] & 1);                // 0x0000001
-		caps->hasSSSE3 = (regs2[2] & (1 << 9 )) >>  9; // 0x0000200
-		caps->hasMMX2 = caps->hasSSE; // SSE cpus supports mmxext too
-		cl_size = ((regs2[1] >> 8) & 0xFF)*8;
-		if(cl_size) caps->cl_size = cl_size;
+        // general feature flags:
+        caps->hasTSC  = (regs2[3] & (1 << 8  )) >>  8; // 0x0000010
+        caps->hasMMX  = (regs2[3] & (1 << 23 )) >> 23; // 0x0800000
+        caps->hasSSE  = (regs2[3] & (1 << 25 )) >> 25; // 0x2000000
+        caps->hasSSE2 = (regs2[3] & (1 << 26 )) >> 26; // 0x4000000
+        caps->hasSSE3 = (regs2[2] & 1);        // 0x0000001
+        caps->hasSSSE3 = (regs2[2] & (1 << 9 )) >>  9; // 0x0000200
+        caps->hasMMX2 = caps->hasSSE; // SSE cpus supports mmxext too
+        cl_size = ((regs2[1] >> 8) & 0xFF)*8;
+        if(cl_size) caps->cl_size = cl_size;
 
-		ptmpstr=tmpstr=GetCpuFriendlyName(regs, regs2);
-		while(*ptmpstr == ' ')        // strip leading spaces
-		    ptmpstr++;
-		mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: %s ", ptmpstr);
-		free(tmpstr);
-		mp_msg(MSGT_CPUDETECT,MSGL_V,"(Family: %d, Model: %d, Stepping: %d)\n",
-		    caps->cpuType, caps->cpuModel, caps->cpuStepping);
+        ptmpstr=tmpstr=GetCpuFriendlyName(regs, regs2);
+        while(*ptmpstr == ' ')    // strip leading spaces
+            ptmpstr++;
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: %s ", ptmpstr);
+        free(tmpstr);
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"(Family: %d, Model: %d, Stepping: %d)\n",
+               caps->cpuType, caps->cpuModel, caps->cpuStepping);
 
-	}
-	do_cpuid(0x80000000, regs);
-	if (regs[0]>=0x80000001) {
-		mp_msg(MSGT_CPUDETECT,MSGL_V,"extended cpuid-level: %d\n",regs[0]&0x7FFFFFFF);
-		do_cpuid(0x80000001, regs2);
-		caps->hasMMX  |= (regs2[3] & (1 << 23 )) >> 23; // 0x0800000
-		caps->hasMMX2 |= (regs2[3] & (1 << 22 )) >> 22; // 0x400000
-		caps->has3DNow    = (regs2[3] & (1 << 31 )) >> 31; //0x80000000
-		caps->has3DNowExt = (regs2[3] & (1 << 30 )) >> 30;
-		caps->hasSSE4a = (regs2[2] & (1 << 6 )) >>  6; // 0x0000040
-	}
-	if(regs[0]>=0x80000006)
-	{
-		do_cpuid(0x80000006, regs2);
-		mp_msg(MSGT_CPUDETECT,MSGL_V,"extended cache-info: %d\n",regs2[2]&0x7FFFFFFF);
-		caps->cl_size  = regs2[2] & 0xFF;
-	}
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"Detected cache-line size is %u bytes\n",caps->cl_size);
+    }
+    do_cpuid(0x80000000, regs);
+    if (regs[0]>=0x80000001) {
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"extended cpuid-level: %d\n",regs[0]&0x7FFFFFFF);
+        do_cpuid(0x80000001, regs2);
+        caps->hasMMX  |= (regs2[3] & (1 << 23 )) >> 23; // 0x0800000
+        caps->hasMMX2 |= (regs2[3] & (1 << 22 )) >> 22; // 0x400000
+        caps->has3DNow    = (regs2[3] & (1 << 31 )) >> 31; //0x80000000
+        caps->has3DNowExt = (regs2[3] & (1 << 30 )) >> 30;
+        caps->hasSSE4a = (regs2[2] & (1 << 6 )) >>  6; // 0x0000040
+    }
+    if(regs[0]>=0x80000006)
+    {
+        do_cpuid(0x80000006, regs2);
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"extended cache-info: %d\n",regs2[2]&0x7FFFFFFF);
+        caps->cl_size  = regs2[2] & 0xFF;
+    }
+    mp_msg(MSGT_CPUDETECT,MSGL_V,"Detected cache-line size is %u bytes\n",caps->cl_size);
 #if 0
-	mp_msg(MSGT_CPUDETECT,MSGL_INFO,"cpudetect: MMX=%d MMX2=%d SSE=%d SSE2=%d 3DNow=%d 3DNowExt=%d\n",
-		gCpuCaps.hasMMX,
-		gCpuCaps.hasMMX2,
-		gCpuCaps.hasSSE,
-		gCpuCaps.hasSSE2,
-		gCpuCaps.has3DNow,
-		gCpuCaps.has3DNowExt );
+    mp_msg(MSGT_CPUDETECT,MSGL_INFO,"cpudetect: MMX=%d MMX2=%d SSE=%d SSE2=%d 3DNow=%d 3DNowExt=%d\n",
+           gCpuCaps.hasMMX,
+           gCpuCaps.hasMMX2,
+           gCpuCaps.hasSSE,
+           gCpuCaps.hasSSE2,
+           gCpuCaps.has3DNow,
+           gCpuCaps.has3DNowExt);
 #endif
 
-		/* FIXME: Does SSE2 need more OS support, too? */
-		if (caps->hasSSE)
-			check_os_katmai_support();
-		if (!caps->hasSSE)
-			caps->hasSSE2 = 0;
-//		caps->has3DNow=1;
-//		caps->hasMMX2 = 0;
-//		caps->hasMMX = 0;
+        /* FIXME: Does SSE2 need more OS support, too? */
+        if (caps->hasSSE)
+            check_os_katmai_support();
+        if (!caps->hasSSE)
+            caps->hasSSE2 = 0;
+//          caps->has3DNow=1;
+//          caps->hasMMX2 = 0;
+//          caps->hasMMX = 0;
 
 #if !CONFIG_RUNTIME_CPUDETECT
 #if !HAVE_MMX
-	if(caps->hasMMX) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX supported but disabled\n");
-	caps->hasMMX=0;
+        if(caps->hasMMX) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX supported but disabled\n");
+        caps->hasMMX=0;
 #endif
 #if !HAVE_MMX2
-	if(caps->hasMMX2) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX2 supported but disabled\n");
-	caps->hasMMX2=0;
+        if(caps->hasMMX2) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX2 supported but disabled\n");
+        caps->hasMMX2=0;
 #endif
 #if !HAVE_SSE
-	if(caps->hasSSE) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"SSE supported but disabled\n");
-	caps->hasSSE=0;
+        if(caps->hasSSE) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"SSE supported but disabled\n");
+        caps->hasSSE=0;
 #endif
 #if !HAVE_SSE2
-	if(caps->hasSSE2) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"SSE2 supported but disabled\n");
-	caps->hasSSE2=0;
+        if(caps->hasSSE2) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"SSE2 supported but disabled\n");
+        caps->hasSSE2=0;
 #endif
 #if !HAVE_AMD3DNOW
-	if(caps->has3DNow) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNow supported but disabled\n");
-	caps->has3DNow=0;
+        if(caps->has3DNow) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNow supported but disabled\n");
+        caps->has3DNow=0;
 #endif
 #if !HAVE_AMD3DNOWEXT
-	if(caps->has3DNowExt) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNowExt supported but disabled\n");
-	caps->has3DNowExt=0;
+        if(caps->has3DNowExt) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNowExt supported but disabled\n");
+        caps->has3DNowExt=0;
 #endif
 #endif  // CONFIG_RUNTIME_CPUDETECT
 }
 
 char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]){
-	char vendor[13];
-	char *retname;
-	int i;
+    char vendor[13];
+    char *retname;
+    int i;
 
-	if (NULL==(retname=malloc(256))) {
-		mp_msg(MSGT_CPUDETECT,MSGL_FATAL,"Error: GetCpuFriendlyName() not enough memory\n");
-		exit(1);
-	}
-	retname[0] = '\0';
+    if (NULL==(retname=malloc(256))) {
+        mp_msg(MSGT_CPUDETECT,MSGL_FATAL,"Error: GetCpuFriendlyName() not enough memory\n");
+        exit(1);
+    }
+    retname[0] = '\0';
 
-	sprintf(vendor,"%.4s%.4s%.4s",(char*)(regs+1),(char*)(regs+3),(char*)(regs+2));
+    sprintf(vendor,"%.4s%.4s%.4s",(char*)(regs+1),(char*)(regs+3),(char*)(regs+2));
 
-	do_cpuid(0x80000000,regs);
-	if (regs[0] >= 0x80000004)
-	{
-		// CPU has built-in namestring
-		for (i = 0x80000002; i <= 0x80000004; i++)
-		{
-			do_cpuid(i, regs);
-			strncat(retname, (char*)regs, 16);
-		}
-	}
-	return retname;
+    do_cpuid(0x80000000,regs);
+    if (regs[0] >= 0x80000004)
+    {
+        // CPU has built-in namestring
+        for (i = 0x80000002; i <= 0x80000004; i++)
+        {
+            do_cpuid(i, regs);
+            strncat(retname, (char*)regs, 16);
+        }
+    }
+    return retname;
 }
 
 #if defined(__linux__) && defined(_POSIX_SOURCE) && !ARCH_X86_64
@@ -281,31 +280,31 @@ static void sigill_handler_sse( int sign
 #if (defined(__MINGW32__) || defined(__CYGWIN__)) && !ARCH_X86_64
 LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep)
 {
-   if(ep->ExceptionRecord->ExceptionCode==EXCEPTION_ILLEGAL_INSTRUCTION){
-      mp_msg(MSGT_CPUDETECT,MSGL_V, "SIGILL, " );
-      ep->ContextRecord->Eip +=3;
-      gCpuCaps.hasSSE=0;
-	  return EXCEPTION_CONTINUE_EXECUTION;
-   }
-   return EXCEPTION_CONTINUE_SEARCH;
+    if(ep->ExceptionRecord->ExceptionCode==EXCEPTION_ILLEGAL_INSTRUCTION){
+        mp_msg(MSGT_CPUDETECT,MSGL_V, "SIGILL, " );
+        ep->ContextRecord->Eip +=3;
+        gCpuCaps.hasSSE=0;
+        return EXCEPTION_CONTINUE_EXECUTION;
+    }
+    return EXCEPTION_CONTINUE_SEARCH;
 }
 #endif /* defined(__MINGW32__) || defined(__CYGWIN__) */
 
 #ifdef __OS2__
-ULONG _System os2_sig_handler_sse( PEXCEPTIONREPORTRECORD       p1,
-                                   PEXCEPTIONREGISTRATIONRECORD p2,
-                                   PCONTEXTRECORD               p3,
-                                   PVOID                        p4 )
+ULONG _System os2_sig_handler_sse(PEXCEPTIONREPORTRECORD       p1,
+                                  PEXCEPTIONREGISTRATIONRECORD p2,
+                                  PCONTEXTRECORD               p3,
+                                  PVOID                        p4)
 {
-   if(p1->ExceptionNum == XCPT_ILLEGAL_INSTRUCTION){
-      mp_msg(MSGT_CPUDETECT, MSGL_V, "SIGILL, ");
+    if(p1->ExceptionNum == XCPT_ILLEGAL_INSTRUCTION){
+        mp_msg(MSGT_CPUDETECT, MSGL_V, "SIGILL, ");
 
-      p3->ctx_RegEip += 3;
-      gCpuCaps.hasSSE = 0;
+        p3->ctx_RegEip += 3;
+        gCpuCaps.hasSSE = 0;
 
-      return XCPT_CONTINUE_EXECUTION;
-   }
-   return XCPT_CONTINUE_SEARCH;
+        return XCPT_CONTINUE_EXECUTION;
+    }
+    return XCPT_CONTINUE_SEARCH;
 }
 #endif
 
@@ -325,103 +324,103 @@ ULONG _System os2_sig_handler_sse( PEXCE
 static void check_os_katmai_support( void )
 {
 #if ARCH_X86_64
-   gCpuCaps.hasSSE=1;
-   gCpuCaps.hasSSE2=1;
+    gCpuCaps.hasSSE=1;
+    gCpuCaps.hasSSE2=1;
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
-   int has_sse=0, ret;
-   size_t len=sizeof(has_sse);
+    int has_sse=0, ret;
+    size_t len=sizeof(has_sse);
 
-   ret = sysctlbyname(SSE_SYSCTL_NAME, &has_sse, &len, NULL, 0);
-   if (ret || !has_sse)
-      gCpuCaps.hasSSE=0;
+    ret = sysctlbyname(SSE_SYSCTL_NAME, &has_sse, &len, NULL, 0);
+    if (ret || !has_sse)
+        gCpuCaps.hasSSE=0;
 
 #elif defined(__NetBSD__) || defined (__OpenBSD__)
 #if __NetBSD_Version__ >= 105250000 || (defined __OpenBSD__)
-   int has_sse, has_sse2, ret, mib[2];
-   size_t varlen;
+    int has_sse, has_sse2, ret, mib[2];
+    size_t varlen;
 
-   mib[0] = CTL_MACHDEP;
-   mib[1] = CPU_SSE;
-   varlen = sizeof(has_sse);
+    mib[0] = CTL_MACHDEP;
+    mib[1] = CPU_SSE;
+    varlen = sizeof(has_sse);
 
-   mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
-   ret = sysctl(mib, 2, &has_sse, &varlen, NULL, 0);
-   gCpuCaps.hasSSE = ret >= 0 && has_sse;
-   mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
+    mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
+    ret = sysctl(mib, 2, &has_sse, &varlen, NULL, 0);
+    gCpuCaps.hasSSE = ret >= 0 && has_sse;
+    mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
 
-   mib[1] = CPU_SSE2;
-   varlen = sizeof(has_sse2);
-   mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE2... " );
-   ret = sysctl(mib, 2, &has_sse2, &varlen, NULL, 0);
-   gCpuCaps.hasSSE2 = ret >= 0 && has_sse2;
-   mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE2 ? "yes.\n" : "no!\n" );
+    mib[1] = CPU_SSE2;
+    varlen = sizeof(has_sse2);
+    mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE2... " );
+    ret = sysctl(mib, 2, &has_sse2, &varlen, NULL, 0);
+    gCpuCaps.hasSSE2 = ret >= 0 && has_sse2;
+    mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE2 ? "yes.\n" : "no!\n" );
 #else
-   gCpuCaps.hasSSE = 0;
-   mp_msg(MSGT_CPUDETECT,MSGL_WARN, "No OS support for SSE, disabling to be safe.\n" );
+    gCpuCaps.hasSSE = 0;
+    mp_msg(MSGT_CPUDETECT,MSGL_WARN, "No OS support for SSE, disabling to be safe.\n" );
 #endif
 #elif defined(__MINGW32__) || defined(__CYGWIN__)
-   LPTOP_LEVEL_EXCEPTION_FILTER exc_fil;
-   if ( gCpuCaps.hasSSE ) {
-      mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
-      exc_fil = SetUnhandledExceptionFilter(win32_sig_handler_sse);
-      __asm__ volatile ("xorps %xmm0, %xmm0");
-      SetUnhandledExceptionFilter(exc_fil);
-      mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
-   }
+    LPTOP_LEVEL_EXCEPTION_FILTER exc_fil;
+    if ( gCpuCaps.hasSSE ) {
+        mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
+        exc_fil = SetUnhandledExceptionFilter(win32_sig_handler_sse);
+        __asm__ volatile ("xorps %xmm0, %xmm0");
+        SetUnhandledExceptionFilter(exc_fil);
+        mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
+    }
 #elif defined(__OS2__)
-   EXCEPTIONREGISTRATIONRECORD RegRec = { 0, &os2_sig_handler_sse };
-   if ( gCpuCaps.hasSSE ) {
-      mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
-      DosSetExceptionHandler( &RegRec );
-      __asm__ volatile ("xorps %xmm0, %xmm0");
-      DosUnsetExceptionHandler( &RegRec );
-      mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
-   }
+    EXCEPTIONREGISTRATIONRECORD RegRec = { 0, &os2_sig_handler_sse };
+    if ( gCpuCaps.hasSSE ) {
+        mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
+        DosSetExceptionHandler( &RegRec );
+        __asm__ volatile ("xorps %xmm0, %xmm0");
+        DosUnsetExceptionHandler( &RegRec );
+        mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
+    }
 #elif defined(__linux__)
 #if defined(_POSIX_SOURCE)
-   struct sigaction saved_sigill;
+    struct sigaction saved_sigill;
 
-   /* Save the original signal handlers.
-    */
-   sigaction( SIGILL, NULL, &saved_sigill );
+    /* Save the original signal handlers.
+     */
+    sigaction( SIGILL, NULL, &saved_sigill );
 
-   signal( SIGILL, (void (*)(int))sigill_handler_sse );
+    signal( SIGILL, (void (*)(int))sigill_handler_sse );
 
-   /* Emulate test for OSFXSR in CR4.  The OS will set this bit if it
-    * supports the extended FPU save and restore required for SSE.  If
-    * we execute an SSE instruction on a PIII and get a SIGILL, the OS
-    * doesn't support Streaming SIMD Exceptions, even if the processor
-    * does.
-    */
-   if ( gCpuCaps.hasSSE ) {
-      mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
+    /* Emulate test for OSFXSR in CR4.  The OS will set this bit if it
+     * supports the extended FPU save and restore required for SSE.  If
+     * we execute an SSE instruction on a PIII and get a SIGILL, the OS
+     * doesn't support Streaming SIMD Exceptions, even if the processor
+     * does.
+     */
+    if ( gCpuCaps.hasSSE ) {
+        mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " );
 
 //      __asm__ volatile ("xorps %%xmm0, %%xmm0");
-      __asm__ volatile ("xorps %xmm0, %xmm0");
+        __asm__ volatile ("xorps %xmm0, %xmm0");
 
-      mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
-   }
+        mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" );
+    }
 
-   /* Restore the original signal handlers.
-    */
-   sigaction( SIGILL, &saved_sigill, NULL );
+    /* Restore the original signal handlers.
+     */
+    sigaction( SIGILL, &saved_sigill, NULL );
 
-   /* If we've gotten to here and the XMM CPUID bit is still set, we're
-    * safe to go ahead and hook out the SSE code throughout Mesa.
-    */
-   mp_msg(MSGT_CPUDETECT,MSGL_V, "Tests of OS support for SSE %s\n", gCpuCaps.hasSSE ? "passed." : "failed!" );
+    /* If we've gotten to here and the XMM CPUID bit is still set, we're
+     * safe to go ahead and hook out the SSE code throughout Mesa.
+     */
+    mp_msg(MSGT_CPUDETECT,MSGL_V, "Tests of OS support for SSE %s\n", gCpuCaps.hasSSE ? "passed." : "failed!" );
 #else
-   /* We can't use POSIX signal handling to test the availability of
-    * SSE, so we disable it by default.
-    */
-   mp_msg(MSGT_CPUDETECT,MSGL_WARN, "Cannot test OS support for SSE, disabling to be safe.\n" );
-   gCpuCaps.hasSSE=0;
+    /* We can't use POSIX signal handling to test the availability of
+     * SSE, so we disable it by default.
+     */
+    mp_msg(MSGT_CPUDETECT,MSGL_WARN, "Cannot test OS support for SSE, disabling to be safe.\n" );
+    gCpuCaps.hasSSE=0;
 #endif /* _POSIX_SOURCE */
 #else
-   /* Do nothing on other platforms for now.
-    */
-   mp_msg(MSGT_CPUDETECT,MSGL_WARN, "Cannot test OS support for SSE, leaving disabled.\n" );
-   gCpuCaps.hasSSE=0;
+    /* Do nothing on other platforms for now.
+     */
+    mp_msg(MSGT_CPUDETECT,MSGL_WARN, "Cannot test OS support for SSE, leaving disabled.\n" );
+    gCpuCaps.hasSSE=0;
 #endif /* __linux__ */
 }
 #else /* ARCH_X86 */
@@ -451,98 +450,98 @@ static void sigill_handler (int sig)
 
 void GetCpuCaps( CpuCaps *caps)
 {
-	caps->cpuType=0;
-	caps->cpuModel=0;
-	caps->cpuStepping=0;
-	caps->hasMMX=0;
-	caps->hasMMX2=0;
-	caps->has3DNow=0;
-	caps->has3DNowExt=0;
-	caps->hasSSE=0;
-	caps->hasSSE2=0;
-	caps->hasSSE3=0;
-	caps->hasSSSE3=0;
-	caps->hasSSE4a=0;
-	caps->isX86=0;
-	caps->hasAltiVec = 0;
+    caps->cpuType=0;
+    caps->cpuModel=0;
+    caps->cpuStepping=0;
+    caps->hasMMX=0;
+    caps->hasMMX2=0;
+    caps->has3DNow=0;
+    caps->has3DNowExt=0;
+    caps->hasSSE=0;
+    caps->hasSSE2=0;
+    caps->hasSSE3=0;
+    caps->hasSSSE3=0;
+    caps->hasSSE4a=0;
+    caps->isX86=0;
+    caps->hasAltiVec = 0;
 #if HAVE_ALTIVEC
 #ifdef __APPLE__
 /*
   rip-off from ffmpeg altivec detection code.
   this code also appears on Apple's AltiVec pages.
  */
-        {
-                int sels[2] = {CTL_HW, HW_VECTORUNIT};
-                int has_vu = 0;
-                size_t len = sizeof(has_vu);
-                int err;
+    {
+        int sels[2] = {CTL_HW, HW_VECTORUNIT};
+        int has_vu = 0;
+        size_t len = sizeof(has_vu);
+        int err;
 
-                err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
+        err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
 
-                if (err == 0)
-                        if (has_vu != 0)
-                                caps->hasAltiVec = 1;
-        }
+        if (err == 0)
+            if (has_vu != 0)
+                caps->hasAltiVec = 1;
+    }
 #elif defined(__AMIGAOS4__)
-        ULONG result = 0;
+    ULONG result = 0;
 
-        GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
-        if (result == VECTORTYPE_ALTIVEC)
-        	caps->hasAltiVec = 1;
+    GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
+    if (result == VECTORTYPE_ALTIVEC)
+        caps->hasAltiVec = 1;
 #else
 /* no Darwin, do it the brute-force way */
 /* this is borrowed from the libmpeg2 library */
-        {
-          signal (SIGILL, sigill_handler);
-          if (sigsetjmp (jmpbuf, 1)) {
+    {
+        signal (SIGILL, sigill_handler);
+        if (sigsetjmp (jmpbuf, 1)) {
             signal (SIGILL, SIG_DFL);
-          } else {
+        } else {
             canjump = 1;
 
-            __asm__ volatile ("mtspr 256, %0\n\t"
+        __asm__ volatile ("mtspr 256, %0\n\t"
                           "vand %%v0, %%v0, %%v0"
                           :
                           : "r" (-1));
 
-            signal (SIGILL, SIG_DFL);
-            caps->hasAltiVec = 1;
-          }
+        signal (SIGILL, SIG_DFL);
+        caps->hasAltiVec = 1;
         }
+    }
 #endif /* __APPLE__ */
-        mp_msg(MSGT_CPUDETECT,MSGL_V,"AltiVec %sfound\n", (caps->hasAltiVec ? "" : "not "));
+    mp_msg(MSGT_CPUDETECT,MSGL_V,"AltiVec %sfound\n", (caps->hasAltiVec ? "" : "not "));
 #endif /* HAVE_ALTIVEC */
 
-if (ARCH_IA64)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: Intel Itanium\n");
+    if (ARCH_IA64)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: Intel Itanium\n");
 
-if (ARCH_SPARC)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: Sun Sparc\n");
+    if (ARCH_SPARC)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: Sun Sparc\n");
 
-if (ARCH_ARM)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: ARM\n");
+    if (ARCH_ARM)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: ARM\n");
 
-if (ARCH_PPC)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: PowerPC\n");
+    if (ARCH_PPC)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: PowerPC\n");
 
-if (ARCH_ALPHA)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: Digital Alpha\n");
+    if (ARCH_ALPHA)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: Digital Alpha\n");
 
-if (ARCH_MIPS)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: MIPS\n");
+    if (ARCH_MIPS)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: MIPS\n");
 
-if (ARCH_PA_RISC)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: Hewlett-Packard PA-RISC\n");
+    if (ARCH_PA_RISC)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: Hewlett-Packard PA-RISC\n");
 
-if (ARCH_S390)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: IBM S/390\n");
+    if (ARCH_S390)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: IBM S/390\n");
 
-if (ARCH_S390X)
-	mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: IBM S/390X\n");
+    if (ARCH_S390X)
+        mp_msg(MSGT_CPUDETECT,MSGL_V,"CPU: IBM S/390X\n");
 
-if (ARCH_VAX)
-	mp_msg(MSGT_CPUDETECT,MSGL_V, "CPU: Digital VAX\n" );
+    if (ARCH_VAX)
+        mp_msg(MSGT_CPUDETECT,MSGL_V, "CPU: Digital VAX\n" );
 
-if (ARCH_XTENSA)
-	mp_msg(MSGT_CPUDETECT,MSGL_V, "CPU: Tensilica Xtensa\n" );
+    if (ARCH_XTENSA)
+        mp_msg(MSGT_CPUDETECT,MSGL_V, "CPU: Tensilica Xtensa\n" );
 }
 #endif /* !ARCH_X86 */

Modified: trunk/cpudetect.h
==============================================================================
--- trunk/cpudetect.h	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/cpudetect.h	Tue May  4 01:34:38 2010	(r31134)
@@ -21,30 +21,30 @@
 
 #include "config.h"
 
-#define CPUTYPE_I386	3
-#define CPUTYPE_I486	4
-#define CPUTYPE_I586	5
+#define CPUTYPE_I386    3
+#define CPUTYPE_I486    4
+#define CPUTYPE_I586    5
 #define CPUTYPE_I686    6
 
 #include "libavutil/x86_cpu.h"
 
 typedef struct cpucaps_s {
-	int cpuType;
-	int cpuModel;
-	int cpuStepping;
-	int hasMMX;
-	int hasMMX2;
-	int has3DNow;
-	int has3DNowExt;
-	int hasSSE;
-	int hasSSE2;
-	int hasSSE3;
-	int hasSSSE3;
-	int hasSSE4a;
-	int isX86;
-	unsigned cl_size; /* size of cache line */
-        int hasAltiVec;
-	int hasTSC;
+    int cpuType;
+    int cpuModel;
+    int cpuStepping;
+    int hasMMX;
+    int hasMMX2;
+    int has3DNow;
+    int has3DNowExt;
+    int hasSSE;
+    int hasSSE2;
+    int hasSSE3;
+    int hasSSSE3;
+    int hasSSE4a;
+    int isX86;
+    unsigned cl_size; /* size of cache line */
+    int hasAltiVec;
+    int hasTSC;
 } CpuCaps;
 
 extern CpuCaps gCpuCaps;

Modified: trunk/cpuinfo.c
==============================================================================
--- trunk/cpuinfo.c	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/cpuinfo.c	Tue May  4 01:34:38 2010	(r31134)
@@ -44,319 +44,319 @@ typedef long long int64_t;
 #endif
 
 #define CPUID_FEATURE_DEF(bit, desc, description) \
-  { bit, desc }
+    { bit, desc }
 
 typedef struct cpuid_regs {
-  unsigned int eax;
-  unsigned int ebx;
-  unsigned int ecx;
-  unsigned int edx;
+    unsigned int eax;
+    unsigned int ebx;
+    unsigned int ecx;
+    unsigned int edx;
 } cpuid_regs_t;
 
 static cpuid_regs_t
 cpuid(int func) {
-  cpuid_regs_t regs;
+    cpuid_regs_t regs;
 #define CPUID   ".byte 0x0f, 0xa2; "
 #ifdef __x86_64__
-  __asm__("mov %%rbx, %%rsi\n\t"
+    __asm__("mov %%rbx, %%rsi\n\t"
 #else
-  __asm__("mov %%ebx, %%esi\n\t"
+    __asm__("mov %%ebx, %%esi\n\t"
 #endif
-      CPUID"\n\t"
+            CPUID"\n\t"
 #ifdef __x86_64__
-      "xchg %%rsi, %%rbx\n\t"
+            "xchg %%rsi, %%rbx\n\t"
 #else
-      "xchg %%esi, %%ebx\n\t"
+            "xchg %%esi, %%ebx\n\t"
 #endif
-      : "=a" (regs.eax), "=S" (regs.ebx), "=c" (regs.ecx), "=d" (regs.edx)
-      : "0" (func));
-  return regs;
+            : "=a" (regs.eax), "=S" (regs.ebx), "=c" (regs.ecx), "=d" (regs.edx)
+            : "0" (func));
+    return regs;
 }
 
 
 static int64_t
 rdtsc(void)
 {
-  uint32_t hi, lo;
+    uint32_t hi, lo;
 #define RDTSC   ".byte 0x0f, 0x31; "
-  __asm__ volatile (RDTSC : "=a"(lo), "=d"(hi) : );
-  return (uint64_t) hi << 32 | lo;
+    __asm__ volatile (RDTSC : "=a"(lo), "=d"(hi) : );
+    return (uint64_t) hi << 32 | lo;
 }
 
 static const char*
 brandname(int i)
 {
-  static const char* brandmap[] = {
-    NULL,
-    "Intel(R) Celeron(R) processor",
-    "Intel(R) Pentium(R) III processor",
-    "Intel(R) Pentium(R) III Xeon(tm) processor",
-    "Intel(R) Pentium(R) III processor",
-    NULL,
-    "Mobile Intel(R) Pentium(R) III processor-M",
-    "Mobile Intel(R) Celeron(R) processor"
-  };
+    static const char* brandmap[] = {
+        NULL,
+        "Intel(R) Celeron(R) processor",
+        "Intel(R) Pentium(R) III processor",
+        "Intel(R) Pentium(R) III Xeon(tm) processor",
+        "Intel(R) Pentium(R) III processor",
+        NULL,
+        "Mobile Intel(R) Pentium(R) III processor-M",
+        "Mobile Intel(R) Celeron(R) processor"
+    };
 
-  if (i >= sizeof(brandmap))
-    return NULL;
-  else
-    return brandmap[i];
+    if (i >= sizeof(brandmap))
+        return NULL;
+    else
+        return brandmap[i];
 }
 
 static void
 store32(char *d, unsigned int v)
 {
-  d[0] =  v        & 0xff;
-  d[1] = (v >>  8) & 0xff;
-  d[2] = (v >> 16) & 0xff;
-  d[3] = (v >> 24) & 0xff;
+    d[0] =  v        & 0xff;
+    d[1] = (v >>  8) & 0xff;
+    d[2] = (v >> 16) & 0xff;
+    d[3] = (v >> 24) & 0xff;
 }
 
 
 int
 main(void)
 {
-  cpuid_regs_t regs, regs_ext;
-  char idstr[13];
-  unsigned max_cpuid;
-  unsigned max_ext_cpuid;
-  unsigned int amd_flags;
-  unsigned int amd_flags2;
-  const char *model_name = NULL;
-  int i;
-  char processor_name[49];
+    cpuid_regs_t regs, regs_ext;
+    char idstr[13];
+    unsigned max_cpuid;
+    unsigned max_ext_cpuid;
+    unsigned int amd_flags;
+    unsigned int amd_flags2;
+    const char *model_name = NULL;
+    int i;
+    char processor_name[49];
 
-  regs = cpuid(0);
-  max_cpuid = regs.eax;
-  /* printf("%d CPUID function codes\n", max_cpuid+1); */
+    regs = cpuid(0);
+    max_cpuid = regs.eax;
+    /* printf("%d CPUID function codes\n", max_cpuid+1); */
 
-  store32(idstr+0, regs.ebx);
-  store32(idstr+4, regs.edx);
-  store32(idstr+8, regs.ecx);
-  idstr[12] = 0;
-  printf("vendor_id\t: %s\n", idstr);
+    store32(idstr+0, regs.ebx);
+    store32(idstr+4, regs.edx);
+    store32(idstr+8, regs.ecx);
+    idstr[12] = 0;
+    printf("vendor_id\t: %s\n", idstr);
 
-  regs_ext = cpuid((1<<31) + 0);
-  max_ext_cpuid = regs_ext.eax;
-  if (max_ext_cpuid >= (1<<31) + 1) {
-    regs_ext = cpuid((1<<31) + 1);
-    amd_flags = regs_ext.edx;
-    amd_flags2 = regs_ext.ecx;
+    regs_ext = cpuid((1<<31) + 0);
+    max_ext_cpuid = regs_ext.eax;
+    if (max_ext_cpuid >= (1<<31) + 1) {
+        regs_ext = cpuid((1<<31) + 1);
+        amd_flags = regs_ext.edx;
+        amd_flags2 = regs_ext.ecx;
 
-    if (max_ext_cpuid >= (1<<31) + 4) {
-      for (i = 2; i <= 4; i++) {
-        regs_ext = cpuid((1<<31) + i);
-        store32(processor_name + (i-2)*16, regs_ext.eax);
-        store32(processor_name + (i-2)*16 + 4, regs_ext.ebx);
-        store32(processor_name + (i-2)*16 + 8, regs_ext.ecx);
-        store32(processor_name + (i-2)*16 + 12, regs_ext.edx);
-      }
-      processor_name[48] = 0;
-      model_name = processor_name;
-      while (*model_name == ' ') {
-        model_name++;
-      }
+        if (max_ext_cpuid >= (1<<31) + 4) {
+            for (i = 2; i <= 4; i++) {
+                regs_ext = cpuid((1<<31) + i);
+                store32(processor_name + (i-2)*16, regs_ext.eax);
+                store32(processor_name + (i-2)*16 + 4, regs_ext.ebx);
+                store32(processor_name + (i-2)*16 + 8, regs_ext.ecx);
+                store32(processor_name + (i-2)*16 + 12, regs_ext.edx);
+            }
+            processor_name[48] = 0;
+            model_name = processor_name;
+            while (*model_name == ' ') {
+                model_name++;
+            }
+        }
+    } else {
+        amd_flags = 0;
+        amd_flags2 = 0;
     }
-  } else {
-    amd_flags = 0;
-    amd_flags2 = 0;
-  }
 
-  if (max_cpuid >= 1) {
-    static struct {
-      int bit;
-      char *desc;
-    } cap[] = {
-      CPUID_FEATURE_DEF(0, "fpu", "Floating-point unit on-chip"),
-      CPUID_FEATURE_DEF(1, "vme", "Virtual Mode Enhancements"),
-      CPUID_FEATURE_DEF(2, "de", "Debugging Extension"),
-      CPUID_FEATURE_DEF(3, "pse", "Page Size Extension"),
-      CPUID_FEATURE_DEF(4, "tsc", "Time Stamp Counter"),
-      CPUID_FEATURE_DEF(5, "msr", "Pentium Processor MSR"),
-      CPUID_FEATURE_DEF(6, "pae", "Physical Address Extension"),
-      CPUID_FEATURE_DEF(7, "mce", "Machine Check Exception"),
-      CPUID_FEATURE_DEF(8, "cx8", "CMPXCHG8B Instruction Supported"),
-      CPUID_FEATURE_DEF(9, "apic", "On-chip APIC Hardware Enabled"),
-      CPUID_FEATURE_DEF(11, "sep", "SYSENTER and SYSEXIT"),
-      CPUID_FEATURE_DEF(12, "mtrr", "Memory Type Range Registers"),
-      CPUID_FEATURE_DEF(13, "pge", "PTE Global Bit"),
-      CPUID_FEATURE_DEF(14, "mca", "Machine Check Architecture"),
-      CPUID_FEATURE_DEF(15, "cmov", "Conditional Move/Compare Instruction"),
-      CPUID_FEATURE_DEF(16, "pat", "Page Attribute Table"),
-      CPUID_FEATURE_DEF(17, "pse36", "Page Size Extension 36-bit"),
-      CPUID_FEATURE_DEF(18, "pn", "Processor Serial Number"),
-      CPUID_FEATURE_DEF(19, "clflush", "CFLUSH instruction"),
-      CPUID_FEATURE_DEF(21, "dts", "Debug Store"),
-      CPUID_FEATURE_DEF(22, "acpi", "Thermal Monitor and Clock Ctrl"),
-      CPUID_FEATURE_DEF(23, "mmx", "MMX Technology"),
-      CPUID_FEATURE_DEF(24, "fxsr", "FXSAVE/FXRSTOR"),
-      CPUID_FEATURE_DEF(25, "sse", "SSE Extensions"),
-      CPUID_FEATURE_DEF(26, "sse2", "SSE2 Extensions"),
-      CPUID_FEATURE_DEF(27, "ss", "Self Snoop"),
-      CPUID_FEATURE_DEF(28, "ht", "Multi-threading"),
-      CPUID_FEATURE_DEF(29, "tm", "Therm. Monitor"),
-      CPUID_FEATURE_DEF(30, "ia64", "IA-64 Processor"),
-      CPUID_FEATURE_DEF(31, "pbe", "Pend. Brk. EN."),
-      { -1 }
-    };
-    static struct {
-      int bit;
-      char *desc;
-    } cap2[] = {
-      CPUID_FEATURE_DEF(0, "pni", "SSE3 Extensions"),
-      CPUID_FEATURE_DEF(1, "pclmulqdq", "Carryless Multiplication"),
-      CPUID_FEATURE_DEF(2, "dtes64", "64-bit Debug Store"),
-      CPUID_FEATURE_DEF(3, "monitor", "MONITOR/MWAIT"),
-      CPUID_FEATURE_DEF(4, "ds_cpl", "CPL Qualified Debug Store"),
-      CPUID_FEATURE_DEF(5, "vmx", "Virtual Machine Extensions"),
-      CPUID_FEATURE_DEF(6, "smx", "Safer Mode Extensions"),
-      CPUID_FEATURE_DEF(7, "est", "Enhanced Intel SpeedStep Technology"),
-      CPUID_FEATURE_DEF(8, "tm2", "Thermal Monitor 2"),
-      CPUID_FEATURE_DEF(9, "ssse3", "Supplemental SSE3"),
-      CPUID_FEATURE_DEF(10, "cid", "L1 Context ID"),
-      CPUID_FEATURE_DEF(12, "fma", "Fused Multiply Add"),
-      CPUID_FEATURE_DEF(13, "cx16", "CMPXCHG16B Available"),
-      CPUID_FEATURE_DEF(14, "xtpr", "xTPR Disable"),
-      CPUID_FEATURE_DEF(15, "pdcm", "Perf/Debug Capability MSR"),
-      CPUID_FEATURE_DEF(18, "dca", "Direct Cache Access"),
-      CPUID_FEATURE_DEF(19, "sse4_1", "SSE4.1 Extensions"),
-      CPUID_FEATURE_DEF(20, "sse4_2", "SSE4.2 Extensions"),
-      CPUID_FEATURE_DEF(21, "x2apic", "x2APIC Feature"),
-      CPUID_FEATURE_DEF(22, "movbe", "MOVBE Instruction"),
-      CPUID_FEATURE_DEF(23, "popcnt", "Pop Count Instruction"),
-      CPUID_FEATURE_DEF(25, "aes", "AES Instruction"),
-      CPUID_FEATURE_DEF(26, "xsave", "XSAVE/XRSTOR Extensions"),
-      CPUID_FEATURE_DEF(27, "osxsave", "XSAVE/XRSTOR Enabled in the OS"),
-      CPUID_FEATURE_DEF(28, "avx", "Advanced Vector Extension"),
-      { -1 }
-    };
-    static struct {
-      int bit;
-      char *desc;
-    } cap_amd[] = {
-      CPUID_FEATURE_DEF(11, "syscall", "SYSCALL and SYSRET"),
-      CPUID_FEATURE_DEF(19, "mp", "MP Capable"),
-      CPUID_FEATURE_DEF(20, "nx", "No-Execute Page Protection"),
-      CPUID_FEATURE_DEF(22, "mmxext", "MMX Technology (AMD Extensions)"),
-      CPUID_FEATURE_DEF(25, "fxsr_opt", "Fast FXSAVE/FXRSTOR"),
-      CPUID_FEATURE_DEF(26, "pdpe1gb", "PDP Entry for 1GiB Page"),
-      CPUID_FEATURE_DEF(27, "rdtscp", "RDTSCP Instruction"),
-      CPUID_FEATURE_DEF(29, "lm", "Long Mode Capable"),
-      CPUID_FEATURE_DEF(30, "3dnowext", "3DNow! Extensions"),
-      CPUID_FEATURE_DEF(31, "3dnow", "3DNow!"),
-      { -1 }
-    };
-    static struct {
-      int bit;
-      char *desc;
-    } cap_amd2[] = {
-      CPUID_FEATURE_DEF(0, "lahf_lm", "LAHF/SAHF Supported in 64-bit Mode"),
-      CPUID_FEATURE_DEF(1, "cmp_legacy", "Chip Multi-Core"),
-      CPUID_FEATURE_DEF(2, "svm", "Secure Virtual Machine"),
-      CPUID_FEATURE_DEF(3, "extapic", "Extended APIC Space"),
-      CPUID_FEATURE_DEF(4, "cr8_legacy", "CR8 Available in Legacy Mode"),
-      CPUID_FEATURE_DEF(5, "abm", "Advanced Bit Manipulation"),
-      CPUID_FEATURE_DEF(6, "sse4a", "SSE4A Extensions"),
-      CPUID_FEATURE_DEF(7, "misalignsse", "Misaligned SSE Mode"),
-      CPUID_FEATURE_DEF(8, "3dnowprefetch", "3DNow! Prefetch/PrefetchW"),
-      CPUID_FEATURE_DEF(9, "osvw", "OS Visible Workaround"),
-      CPUID_FEATURE_DEF(10, "ibs", "Instruction Based Sampling"),
-      CPUID_FEATURE_DEF(11, "sse5", "SSE5 Extensions"),
-      CPUID_FEATURE_DEF(12, "skinit", "SKINIT, STGI, and DEV Support"),
-      CPUID_FEATURE_DEF(13, "wdt", "Watchdog Timer Support"),
-      { -1 }
-    };
-    unsigned int family, model, stepping;
+    if (max_cpuid >= 1) {
+        static struct {
+            int bit;
+            char *desc;
+        } cap[] = {
+            CPUID_FEATURE_DEF(0, "fpu", "Floating-point unit on-chip"),
+            CPUID_FEATURE_DEF(1, "vme", "Virtual Mode Enhancements"),
+            CPUID_FEATURE_DEF(2, "de", "Debugging Extension"),
+            CPUID_FEATURE_DEF(3, "pse", "Page Size Extension"),
+            CPUID_FEATURE_DEF(4, "tsc", "Time Stamp Counter"),
+            CPUID_FEATURE_DEF(5, "msr", "Pentium Processor MSR"),
+            CPUID_FEATURE_DEF(6, "pae", "Physical Address Extension"),
+            CPUID_FEATURE_DEF(7, "mce", "Machine Check Exception"),
+            CPUID_FEATURE_DEF(8, "cx8", "CMPXCHG8B Instruction Supported"),
+            CPUID_FEATURE_DEF(9, "apic", "On-chip APIC Hardware Enabled"),
+            CPUID_FEATURE_DEF(11, "sep", "SYSENTER and SYSEXIT"),
+            CPUID_FEATURE_DEF(12, "mtrr", "Memory Type Range Registers"),
+            CPUID_FEATURE_DEF(13, "pge", "PTE Global Bit"),
+            CPUID_FEATURE_DEF(14, "mca", "Machine Check Architecture"),
+            CPUID_FEATURE_DEF(15, "cmov", "Conditional Move/Compare Instruction"),
+            CPUID_FEATURE_DEF(16, "pat", "Page Attribute Table"),
+            CPUID_FEATURE_DEF(17, "pse36", "Page Size Extension 36-bit"),
+            CPUID_FEATURE_DEF(18, "pn", "Processor Serial Number"),
+            CPUID_FEATURE_DEF(19, "clflush", "CFLUSH instruction"),
+            CPUID_FEATURE_DEF(21, "dts", "Debug Store"),
+            CPUID_FEATURE_DEF(22, "acpi", "Thermal Monitor and Clock Ctrl"),
+            CPUID_FEATURE_DEF(23, "mmx", "MMX Technology"),
+            CPUID_FEATURE_DEF(24, "fxsr", "FXSAVE/FXRSTOR"),
+            CPUID_FEATURE_DEF(25, "sse", "SSE Extensions"),
+            CPUID_FEATURE_DEF(26, "sse2", "SSE2 Extensions"),
+            CPUID_FEATURE_DEF(27, "ss", "Self Snoop"),
+            CPUID_FEATURE_DEF(28, "ht", "Multi-threading"),
+            CPUID_FEATURE_DEF(29, "tm", "Therm. Monitor"),
+            CPUID_FEATURE_DEF(30, "ia64", "IA-64 Processor"),
+            CPUID_FEATURE_DEF(31, "pbe", "Pend. Brk. EN."),
+            { -1 }
+        };
+        static struct {
+            int bit;
+            char *desc;
+        } cap2[] = {
+            CPUID_FEATURE_DEF(0, "pni", "SSE3 Extensions"),
+            CPUID_FEATURE_DEF(1, "pclmulqdq", "Carryless Multiplication"),
+            CPUID_FEATURE_DEF(2, "dtes64", "64-bit Debug Store"),
+            CPUID_FEATURE_DEF(3, "monitor", "MONITOR/MWAIT"),
+            CPUID_FEATURE_DEF(4, "ds_cpl", "CPL Qualified Debug Store"),
+            CPUID_FEATURE_DEF(5, "vmx", "Virtual Machine Extensions"),
+            CPUID_FEATURE_DEF(6, "smx", "Safer Mode Extensions"),
+            CPUID_FEATURE_DEF(7, "est", "Enhanced Intel SpeedStep Technology"),
+            CPUID_FEATURE_DEF(8, "tm2", "Thermal Monitor 2"),
+            CPUID_FEATURE_DEF(9, "ssse3", "Supplemental SSE3"),
+            CPUID_FEATURE_DEF(10, "cid", "L1 Context ID"),
+            CPUID_FEATURE_DEF(12, "fma", "Fused Multiply Add"),
+            CPUID_FEATURE_DEF(13, "cx16", "CMPXCHG16B Available"),
+            CPUID_FEATURE_DEF(14, "xtpr", "xTPR Disable"),
+            CPUID_FEATURE_DEF(15, "pdcm", "Perf/Debug Capability MSR"),
+            CPUID_FEATURE_DEF(18, "dca", "Direct Cache Access"),
+            CPUID_FEATURE_DEF(19, "sse4_1", "SSE4.1 Extensions"),
+            CPUID_FEATURE_DEF(20, "sse4_2", "SSE4.2 Extensions"),
+            CPUID_FEATURE_DEF(21, "x2apic", "x2APIC Feature"),
+            CPUID_FEATURE_DEF(22, "movbe", "MOVBE Instruction"),
+            CPUID_FEATURE_DEF(23, "popcnt", "Pop Count Instruction"),
+            CPUID_FEATURE_DEF(25, "aes", "AES Instruction"),
+            CPUID_FEATURE_DEF(26, "xsave", "XSAVE/XRSTOR Extensions"),
+            CPUID_FEATURE_DEF(27, "osxsave", "XSAVE/XRSTOR Enabled in the OS"),
+            CPUID_FEATURE_DEF(28, "avx", "Advanced Vector Extension"),
+            { -1 }
+        };
+        static struct {
+            int bit;
+            char *desc;
+        } cap_amd[] = {
+            CPUID_FEATURE_DEF(11, "syscall", "SYSCALL and SYSRET"),
+            CPUID_FEATURE_DEF(19, "mp", "MP Capable"),
+            CPUID_FEATURE_DEF(20, "nx", "No-Execute Page Protection"),
+            CPUID_FEATURE_DEF(22, "mmxext", "MMX Technology (AMD Extensions)"),
+            CPUID_FEATURE_DEF(25, "fxsr_opt", "Fast FXSAVE/FXRSTOR"),
+            CPUID_FEATURE_DEF(26, "pdpe1gb", "PDP Entry for 1GiB Page"),
+            CPUID_FEATURE_DEF(27, "rdtscp", "RDTSCP Instruction"),
+            CPUID_FEATURE_DEF(29, "lm", "Long Mode Capable"),
+            CPUID_FEATURE_DEF(30, "3dnowext", "3DNow! Extensions"),
+            CPUID_FEATURE_DEF(31, "3dnow", "3DNow!"),
+            { -1 }
+        };
+        static struct {
+            int bit;
+            char *desc;
+        } cap_amd2[] = {
+            CPUID_FEATURE_DEF(0, "lahf_lm", "LAHF/SAHF Supported in 64-bit Mode"),
+            CPUID_FEATURE_DEF(1, "cmp_legacy", "Chip Multi-Core"),
+            CPUID_FEATURE_DEF(2, "svm", "Secure Virtual Machine"),
+            CPUID_FEATURE_DEF(3, "extapic", "Extended APIC Space"),
+            CPUID_FEATURE_DEF(4, "cr8_legacy", "CR8 Available in Legacy Mode"),
+            CPUID_FEATURE_DEF(5, "abm", "Advanced Bit Manipulation"),
+            CPUID_FEATURE_DEF(6, "sse4a", "SSE4A Extensions"),
+            CPUID_FEATURE_DEF(7, "misalignsse", "Misaligned SSE Mode"),
+            CPUID_FEATURE_DEF(8, "3dnowprefetch", "3DNow! Prefetch/PrefetchW"),
+            CPUID_FEATURE_DEF(9, "osvw", "OS Visible Workaround"),
+            CPUID_FEATURE_DEF(10, "ibs", "Instruction Based Sampling"),
+            CPUID_FEATURE_DEF(11, "sse5", "SSE5 Extensions"),
+            CPUID_FEATURE_DEF(12, "skinit", "SKINIT, STGI, and DEV Support"),
+            CPUID_FEATURE_DEF(13, "wdt", "Watchdog Timer Support"),
+            { -1 }
+        };
+        unsigned int family, model, stepping;
 
-    regs = cpuid(1);
-    family = (regs.eax >> 8) & 0xf;
-    model = (regs.eax >> 4) & 0xf;
-    stepping = regs.eax & 0xf;
+        regs = cpuid(1);
+        family = (regs.eax >> 8) & 0xf;
+        model = (regs.eax >> 4) & 0xf;
+        stepping = regs.eax & 0xf;
 
-    if (family == 0xf)
-      family += (regs.eax >> 20) & 0xff;
-    if (family == 0xf || family == 6)
-      model += ((regs.eax >> 16) & 0xf) << 4;
+        if (family == 0xf)
+            family += (regs.eax >> 20) & 0xff;
+        if (family == 0xf || family == 6)
+            model += ((regs.eax >> 16) & 0xf) << 4;
 
-    printf("cpu family\t: %d\n"
-           "model\t\t: %d\n"
-           "stepping\t: %d\n" ,
-           family,
-           model,
-           stepping);
+        printf("cpu family\t: %d\n"
+               "model\t\t: %d\n"
+               "stepping\t: %d\n" ,
+               family,
+               model,
+               stepping);
 
-    if (strstr(idstr, "Intel") && !model_name) {
-      if (family == 6 && model == 0xb && stepping == 1)
-        model_name = "Intel (R) Celeron (R) processor";
-      else
-        model_name = brandname(regs.ebx & 0xf);
-    }
+        if (strstr(idstr, "Intel") && !model_name) {
+            if (family == 6 && model == 0xb && stepping == 1)
+                model_name = "Intel (R) Celeron (R) processor";
+            else
+                model_name = brandname(regs.ebx & 0xf);
+        }
 
-    printf("flags\t\t:");
-    for (i = 0; cap[i].bit >= 0; i++) {
-      if (regs.edx & (1 << cap[i].bit)) {
-        printf(" %s", cap[i].desc);
-      }
-    }
-    for (i = 0; cap2[i].bit >= 0; i++) {
-      if (regs.ecx & (1 << cap2[i].bit)) {
-        printf(" %s", cap2[i].desc);
-      }
-    }
-    /* k6_mtrr is supported by some AMD K6-2/K6-III CPUs but
-       it is not indicated by a CPUID feature bit, so we
-       have to check the family, model and stepping instead. */
-    if (strstr(idstr, "AMD") &&
-        family == 5 &&
-        (model >= 9 || (model == 8 && stepping >= 8)))
-      printf(" %s", "k6_mtrr");
-    /* similar for cyrix_arr. */
-    if (strstr(idstr, "Cyrix") &&
-        (family == 5 && (model < 4 || family == 6)))
-      printf(" %s", "cyrix_arr");
-    /* as well as centaur_mcr. */
-    if (strstr(idstr, "Centaur") &&
-        family == 5)
-      printf(" %s", "centaur_mcr");
+        printf("flags\t\t:");
+        for (i = 0; cap[i].bit >= 0; i++) {
+            if (regs.edx & (1 << cap[i].bit)) {
+                printf(" %s", cap[i].desc);
+            }
+        }
+        for (i = 0; cap2[i].bit >= 0; i++) {
+            if (regs.ecx & (1 << cap2[i].bit)) {
+                printf(" %s", cap2[i].desc);
+            }
+        }
+        /* k6_mtrr is supported by some AMD K6-2/K6-III CPUs but
+           it is not indicated by a CPUID feature bit, so we
+           have to check the family, model and stepping instead. */
+        if (strstr(idstr, "AMD") &&
+            family == 5 &&
+            (model >= 9 || (model == 8 && stepping >= 8)))
+            printf(" %s", "k6_mtrr");
+        /* similar for cyrix_arr. */
+        if (strstr(idstr, "Cyrix") &&
+            (family == 5 && (model < 4 || family == 6)))
+            printf(" %s", "cyrix_arr");
+        /* as well as centaur_mcr. */
+        if (strstr(idstr, "Centaur") &&
+            family == 5)
+            printf(" %s", "centaur_mcr");
 
-    for (i = 0; cap_amd[i].bit >= 0; i++) {
-      if (amd_flags & (1 << cap_amd[i].bit)) {
-        printf(" %s", cap_amd[i].desc);
-      }
-    }
-    for (i = 0; cap_amd2[i].bit >= 0; i++) {
-      if (amd_flags2 & (1 << cap_amd2[i].bit)) {
-        printf(" %s", cap_amd2[i].desc);
-      }
-    }
-    printf("\n");
+        for (i = 0; cap_amd[i].bit >= 0; i++) {
+            if (amd_flags & (1 << cap_amd[i].bit)) {
+                printf(" %s", cap_amd[i].desc);
+            }
+        }
+        for (i = 0; cap_amd2[i].bit >= 0; i++) {
+            if (amd_flags2 & (1 << cap_amd2[i].bit)) {
+                printf(" %s", cap_amd2[i].desc);
+            }
+        }
+        printf("\n");
 
-    if (regs.edx & (1 << 4)) {
-      int64_t tsc_start, tsc_end;
-      struct timeval tv_start, tv_end;
-      int usec_delay;
+        if (regs.edx & (1 << 4)) {
+            int64_t tsc_start, tsc_end;
+            struct timeval tv_start, tv_end;
+            int usec_delay;
 
-      tsc_start = rdtsc();
-      gettimeofday(&tv_start, NULL);
+            tsc_start = rdtsc();
+            gettimeofday(&tv_start, NULL);
 #ifdef  MISSING_USLEEP
-      sleep(1);
+            sleep(1);
 #else
-      usleep(100000);
+            usleep(100000);
 #endif
-      tsc_end = rdtsc();
-      gettimeofday(&tv_end, NULL);
+            tsc_end = rdtsc();
+            gettimeofday(&tv_end, NULL);
 
-      usec_delay = 1000000 * (tv_end.tv_sec - tv_start.tv_sec)
-        + (tv_end.tv_usec - tv_start.tv_usec);
+            usec_delay = 1000000 * (tv_end.tv_sec - tv_start.tv_sec)
+                + (tv_end.tv_usec - tv_start.tv_usec);
 
-      printf("cpu MHz\t\t: %.3f\n",
-             (double)(tsc_end-tsc_start) / usec_delay);
+            printf("cpu MHz\t\t: %.3f\n",
+                   (double)(tsc_end-tsc_start) / usec_delay);
+        }
     }
-  }
 
-  printf("model name\t: ");
-  if (model_name)
-    printf("%s\n", model_name);
-  else
-    printf("Unknown %s CPU\n", idstr);
+    printf("model name\t: ");
+    if (model_name)
+        printf("%s\n", model_name);
+    else
+        printf("Unknown %s CPU\n", idstr);
 }

Modified: trunk/edl.h
==============================================================================
--- trunk/edl.h	Tue May  4 01:00:58 2010	(r31133)
+++ trunk/edl.h	Tue May  4 01:34:38 2010	(r31134)
@@ -28,12 +28,12 @@
 #define EDL_MUTE_END 0
 
 struct edl_record {
-  float start_sec;
-  float stop_sec;
-  float length_sec;
-  short action;
-  struct edl_record* next;
-  struct edl_record* prev;
+    float start_sec;
+    float stop_sec;
+    float length_sec;
+    short action;
+    struct edl_record* next;
+    struct edl_record* prev;
 };
 
 typedef struct edl_record* edl_record_ptr;


More information about the MPlayer-cvslog mailing list