summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_xv.c
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2012-02-14 22:26:28 +0200
committerPetri Hintukainen <phintuka@users.sourceforge.net>2012-02-14 22:26:28 +0200
commitc7b56e4119bc8870fc4f35ac38159414cfe54ff1 (patch)
treedaa4a41dde50a45b5a14a98bd8c4a231a6345a94 /src/video_out/video_out_xv.c
parent428214feb6e7f8ac24e64d9c6d8fbd5382bf539a (diff)
parent8104053a5d71f7ca8c673469d81fc961542e7560 (diff)
downloadxine-lib-c7b56e4119bc8870fc4f35ac38159414cfe54ff1.tar.gz
xine-lib-c7b56e4119bc8870fc4f35ac38159414cfe54ff1.tar.bz2
Merge from 1.1
--HG-- rename : src/xine-utils/xineutils.h => include/xine/xineutils.h
Diffstat (limited to 'src/video_out/video_out_xv.c')
-rw-r--r--src/video_out/video_out_xv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index edff2905a..2d709c599 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -741,6 +741,8 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) {
static int xv_get_property (vo_driver_t *this_gen, int property) {
xv_driver_t *this = (xv_driver_t *) this_gen;
+ if ((property < 0) || (property >= VO_NUM_PROPERTIES)) return (0);
+
switch (property) {
case VO_PROP_WINDOW_WIDTH:
this->props[property].value = this->sc.gui_width;
@@ -784,6 +786,8 @@ static int xv_set_property (vo_driver_t *this_gen,
printf("xv_set_property: property=%d, value=%d\n", property, value );
+ if ((property < 0) || (property >= VO_NUM_PROPERTIES)) return 0;
+
if (this->props[property].atom != None) {
/* value is out of bound */
@@ -857,6 +861,11 @@ static void xv_get_property_min_max (vo_driver_t *this_gen,
int property, int *min, int *max) {
xv_driver_t *this = (xv_driver_t *) this_gen;
+ if ((property < 0) || (property >= VO_NUM_PROPERTIES)) {
+ *min = *max = 0;
+ return;
+ }
+
*min = this->props[property].min;
*max = this->props[property].max;
}