1
mirror of https://github.com/mpv-player/mpv synced 2024-09-12 23:45:53 +02:00

CONF_TYPE_IMGFMT now supports 0xffffffff (hexa)-style fourccs too

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10598 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2003-08-13 17:38:30 +00:00
parent 978dd0fc27
commit 9cc5a0f4ab

View File

@ -961,7 +961,9 @@ static int parse_imgfmt(m_option_t* opt,char *name, char *param, void* dst, int
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 @@ static int parse_imgfmt(m_option_t* opt,char *name, char *param, void* dst, int
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;