mirror of
https://github.com/mpv-player/mpv
synced 2025-01-18 21:31:13 +00: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:
parent
978dd0fc27
commit
9cc5a0f4ab
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user