0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00

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

View File

@ -18,9 +18,10 @@ LIBVD_EXTERN(raw)
// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
int format = sh->bih ? sh->bih->biCompression : sh->format;
switch(cmd){
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_UNKNOWN;