summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-24 06:41:12 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-25 03:34:27 +0300
commit342ae8d3b5597d59e6a3650ca78ed7f1eb070c4e (patch)
treeb169966980cdf13029600551cb4140377c2dfee1 /libmpcodecs/vd.c
parent0e757bf9daa55db9fa7052efe5aef09f90044054 (diff)
downloadmpv-342ae8d3b5597d59e6a3650ca78ed7f1eb070c4e.tar.bz2
mpv-342ae8d3b5597d59e6a3650ca78ed7f1eb070c4e.tar.xz
Store video decoder functions in struct sh_video field
Remove the global variable mpvdec and move the video decoder pointer to struct sh_video field vd_driver. Audio already had a similar ad_driver field from before.
Diffstat (limited to 'libmpcodecs/vd.c')
-rw-r--r--libmpcodecs/vd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 7fb6af600f..a94ac9ff85 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -132,8 +132,6 @@ int vo_gamma_contrast = 1000;
int vo_gamma_saturation = 1000;
int vo_gamma_hue = 1000;
-extern vd_functions_t* mpvdec; // FIXME!
-
int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt){
struct MPOpts *opts = sh->opts;
int i,j;
@@ -182,7 +180,7 @@ csp_again:
if((flags&VFCAP_CSP_SUPPORTED_BY_HW) || (flags&VFCAP_CSP_SUPPORTED && j<0)){
// check (query) if codec really support this outfmt...
sh->outfmtidx=j; // pass index to the control() function this way
- if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)==CONTROL_FALSE){
+ if(sh->vd_driver->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)==CONTROL_FALSE){
mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: codec query_format(%s) returned FALSE\n",vo_format_name(out_fmt));
continue;
}
@@ -190,7 +188,7 @@ csp_again:
} else
if(!palette && !(flags&(VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_CSP_SUPPORTED)) && (out_fmt==IMGFMT_RGB8||out_fmt==IMGFMT_BGR8)){
sh->outfmtidx=j; // pass index to the control() function this way
- if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)!=CONTROL_FALSE)
+ if(sh->vd_driver->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)!=CONTROL_FALSE)
palette=1;
}
}