diff --git a/libmpcodecs/vd_raw.c b/libmpcodecs/vd_raw.c index 407bcec7e6..323458044d 100644 --- a/libmpcodecs/vd_raw.c +++ b/libmpcodecs/vd_raw.c @@ -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;