summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-24 08:16:11 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-25 07:15:07 +0300
commitbb679dd40a80e72272dec0c8621b888f4365852c (patch)
tree61673a17f7a3296e179da6fbda6c11b82c1596e1
parent60f104d4aaf9f1f990045ca255c343e77ed3078c (diff)
downloadmpv-bb679dd40a80e72272dec0c8621b888f4365852c.tar.bz2
mpv-bb679dd40a80e72272dec0c8621b888f4365852c.tar.xz
Remove global vo_flags
Move the information to struct sh_video field.
-rw-r--r--libmpcodecs/vd.c7
-rw-r--r--libmpdemux/stheader.h1
-rw-r--r--libvo/video_out.c2
-rw-r--r--libvo/video_out.h2
-rw-r--r--mplayer.c4
5 files changed, 6 insertions, 10 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 1ff8b11522..623be9b2e8 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -104,7 +104,6 @@ vd_functions_t *mpcodecs_vd_drivers[] = {
#include "libvo/video_out.h"
// libvo opts:
-int vo_flags = 0;
int vd_use_slices = 1;
/** global variables for gamma, brightness, contrast, saturation and hue
@@ -178,7 +177,7 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
continue;
}
j = i;
- vo_flags = flags;
+ sh->output_flags = flags;
if (flags & VFCAP_CSP_SUPPORTED_BY_HW)
break;
} else if (!palette
@@ -242,9 +241,9 @@ int mpcodecs_config_vo(sh_video_t *sh, int w, int h,
if (!(sh->codec->outflags[j] & CODECS_FLAG_NOFLIP))
opts->flip = 1;
}
- if (vo_flags & VFCAP_FLIPPED)
+ if (sh->output_flags & VFCAP_FLIPPED)
opts->flip ^= 1;
- if (opts->flip && !(vo_flags & VFCAP_FLIP)) {
+ if (opts->flip && !(sh->output_flags & VFCAP_FLIP)) {
// we need to flip, but no flipping filter avail.
vf_add_before_vo(&vf, "flip", NULL);
sh->vfilter = vf;
diff --git a/libmpdemux/stheader.h b/libmpdemux/stheader.h
index e52cc5cb3f..469314b541 100644
--- a/libmpdemux/stheader.h
+++ b/libmpdemux/stheader.h
@@ -84,6 +84,7 @@ typedef struct sh_video {
// output driver/filters: (set by libmpcodecs core)
unsigned int outfmtidx;
struct vf_instance *vfilter; // the video filter chain, used for this video stream
+ int output_flags; // query_format() results for output filters+vo
struct vd_functions *vd_driver;
int vf_initialized;
#ifdef DYNAMIC_PLUGINS
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 9b0ca48504..de060dacf6 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -24,8 +24,6 @@
#include "x11_common.h"
#endif
-//int vo_flags=0;
-
int xinerama_screen = -1;
int xinerama_x;
int xinerama_y;
diff --git a/libvo/video_out.h b/libvo/video_out.h
index 9b7d93de17..1c13183222 100644
--- a/libvo/video_out.h
+++ b/libvo/video_out.h
@@ -239,8 +239,6 @@ void vo_destroy(struct vo *vo);
// NULL terminated array of all drivers
extern const struct vo_driver *video_out_drivers[];
-extern int vo_flags;
-
extern int xinerama_screen;
extern int xinerama_x;
extern int xinerama_y;
diff --git a/mplayer.c b/mplayer.c
index 5f06ab8fc8..d2bee07ce4 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -2123,7 +2123,7 @@ static int sleep_until_update(struct MPContext *mpctx, float *time_frame,
//============================== SLEEP: ===================================
// flag 256 means: libvo driver does its timing (dvb card)
- if (*time_frame > 0.001 && !(vo_flags&256))
+ if (*time_frame > 0.001 && !(mpctx->sh_video->output_flags&256))
*time_frame = timing_sleep(*time_frame);
return frame_time_remaining;
}
@@ -3551,7 +3551,7 @@ if(!reinit_video_chain(mpctx)) {
}
}
- if(vo_flags & 0x08 && vo_spudec)
+ if(mpctx->sh_video->output_flags & 0x08 && vo_spudec)
spudec_set_hw_spu(vo_spudec,mpctx->video_out);
#ifdef HAVE_FREETYPE