mirror of https://github.com/mpv-player/mpv
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:
parent
7f886b293d
commit
92b7c0aae0
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue