summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-04-07 02:12:15 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-04-07 02:12:15 +0000
commit69a4881d048795bc58b3f3cb5eb5d5eec3b2d2b6 (patch)
tree225a5d56212bc723b24ef4882d2fe221237ef620 /libmpcodecs
parentb909e60fe9c6c7d21bbbdfcafb1b9db5ab53bc69 (diff)
downloadmpv-69a4881d048795bc58b3f3cb5eb5d5eec3b2d2b6.tar.bz2
mpv-69a4881d048795bc58b3f3cb5eb5d5eec3b2d2b6.tar.xz
vo_config_count now counts calls to vo->config()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5512 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vf_vo.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmpcodecs/vf_vo.c b/libmpcodecs/vf_vo.c
index 89189ca4fc..d2fb9e2672 100644
--- a/libmpcodecs/vf_vo.c
+++ b/libmpcodecs/vf_vo.c
@@ -19,6 +19,7 @@ static int config(struct vf_instance_s* vf,
unsigned int flags, unsigned int outfmt){
if(video_out->config(width,height,d_width,d_height,flags,"MPlayer",outfmt,NULL))
return 0;
+ ++vo_config_count;
return 1;
}
@@ -34,12 +35,13 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
static void get_image(struct vf_instance_s* vf,
mp_image_t *mpi){
- if(vo_directrendering)
+ if(vo_directrendering && vo_config_count)
video_out->control(VOCTRL_GET_IMAGE,mpi);
}
static void put_image(struct vf_instance_s* vf,
mp_image_t *mpi){
+ if(!vo_config_count) return; // vo not configured?
// first check, maybe the vo/vf plugin implements draw_image using mpi:
if(video_out->control(VOCTRL_DRAW_IMAGE,mpi)==VO_TRUE) return; // done.
// nope, fallback to old draw_frame/draw_slice:
@@ -54,6 +56,7 @@ static void put_image(struct vf_instance_s* vf,
static void draw_slice(struct vf_instance_s* vf,
unsigned char* src, int* stride, int w,int h, int x, int y){
+ if(!vo_config_count) return; // vo not configured?
video_out->draw_slice(src,stride,w,h,x,y);
}