Make vd_raw VDCTRL_QUERY_FORMAT simpler to understand

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23316 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-05-14 18:21:39 +00:00
parent 7f886b293d
commit 92b7c0aae0
1 changed files with 2 additions and 1 deletions

View File

@ -18,9 +18,10 @@ LIBVD_EXTERN(raw)
// to set/get/query special features/parameters // to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){ static int control(sh_video_t *sh,int cmd,void* arg,...){
int format = sh->bih ? sh->bih->biCompression : sh->format;
switch(cmd){ switch(cmd){
case VDCTRL_QUERY_FORMAT: case VDCTRL_QUERY_FORMAT:
if( (*((int*)arg)) == (sh->bih ? sh->bih->biCompression : sh->format) ) return CONTROL_TRUE; if (*(int *)arg == format) return CONTROL_TRUE;
return CONTROL_FALSE; return CONTROL_FALSE;
} }
return CONTROL_UNKNOWN; return CONTROL_UNKNOWN;