diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-07-25 13:12:23 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-07-25 13:12:23 +0000 |
commit | 6ee4bfccdb8da2c775a411a6279ef5def3c2f72d (patch) | |
tree | 7e41596952b1c8a95d5a36d809123248c075ab22 /libmpcodecs | |
parent | ac55131625d48bccf150efb6af7d1b7049a5818c (diff) |
eq reworked
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6787 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/dec_video.c | 16 | ||||
-rw-r--r-- | libmpcodecs/vf_vo.c | 4 |
2 files changed, 13 insertions, 7 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 32302757f9..7a264504ce 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -77,10 +77,11 @@ void set_video_quality(sh_video_t *sh_video,int quality){ int set_video_colors(sh_video_t *sh_video,char *item,int value) { vf_instance_t* vf=sh_video->vfilter; - + + mp_dbg(MSGT_DECVIDEO,MSGL_V,"set video colors %s=%d \n", item, value); if (vf) { - int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, item, (int *)value); + int ret = vf->control(vf, VFCTRL_SET_EQUALIZER, item, (int *)value); if (ret == CONTROL_TRUE) return(1); } @@ -92,9 +93,14 @@ int set_video_colors(sh_video_t *sh_video,char *item,int value) int get_video_colors(sh_video_t *sh_video,char *item,int *value) { vf_instance_t* vf=sh_video->vfilter; - - if (vf->control(vf, VFCTRL_GET_EQUALIZER, item, value) == CONTROL_TRUE) - return 1; + + mp_dbg(MSGT_DECVIDEO,MSGL_V,"get video colors %s \n", item); + if (vf) + { + int ret = vf->control(vf, VFCTRL_GET_EQUALIZER, item, value); + if (ret == CONTROL_TRUE) + return(1); + } /* try software control */ if(mpvdec) return mpvdec->control(sh_video,VDCTRL_GET_EQUALIZER, item, value); return 0; diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c index 9189010f6e..e82b85b668 100644 --- a/libmpcodecs/vf_vo.c +++ b/libmpcodecs/vf_vo.c @@ -70,13 +70,13 @@ static int control(struct vf_instance_s* vf, int request, void* data, ...) case VFCTRL_GET_EQUALIZER: { va_list ap; - int value; + int *value; if(!vo_config_count) return CONTROL_FALSE; // vo not configured? va_start(ap, data); value = va_arg(ap, int); va_end(ap); - return((video_out->control(VOCTRL_GET_EQUALIZER, data, (int *)value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE); + return((video_out->control(VOCTRL_GET_EQUALIZER, data, value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE); } } // return video_out->control(request,data); |