changeset 10597:697688503349

CONF_TYPE_IMGFMT now supports 0xffffffff (hexa)-style fourccs too
author alex
date Wed, 13 Aug 2003 17:38:30 +0000
parents 14695e4f37fc
children 2b88c28a3cfe
files m_option.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m_option.c	Wed Aug 13 17:03:36 2003 +0000
+++ b/m_option.c	Wed Aug 13 17:38:30 2003 +0000
@@ -961,7 +961,9 @@
     mp_msg(MSGT_CFGPARSER, MSGL_INFO, "\n");
     return M_OPT_EXIT;
   }
-
+  
+  if (sscanf(param, "0x%x", &fmt) != 1)
+  {
   for(i = 0 ; mp_imgfmt_list[i].name ; i++) {
     if(!strcasecmp(param,mp_imgfmt_list[i].name)) {
       fmt=mp_imgfmt_list[i].fmt;
@@ -972,6 +974,7 @@
     mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Option %s: unknown format name: '%s'\n",name,param);
     return M_OPT_INVALID;
   }
+  }
 
   if(dst)
     *((uint32_t*)dst) = fmt;