summaryrefslogtreecommitdiff
path: root/src/video_out
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_out')
-rw-r--r--src/video_out/video_out_vidix.c8
-rw-r--r--src/video_out/video_out_xcbxv.c9
-rw-r--r--src/video_out/video_out_xv.c9
-rw-r--r--src/video_out/video_out_xvmc.c8
-rw-r--r--src/video_out/video_out_xxmc.c8
5 files changed, 42 insertions, 0 deletions
diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c
index 41406fb58..81ae8e01a 100644
--- a/src/video_out/video_out_vidix.c
+++ b/src/video_out/video_out_vidix.c
@@ -697,6 +697,8 @@ static int vidix_get_property (vo_driver_t *this_gen, int property) {
vidix_driver_t *this = (vidix_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;
@@ -731,6 +733,8 @@ static int vidix_set_property (vo_driver_t *this_gen,
vidix_driver_t *this = (vidix_driver_t *) this_gen;
int err;
+ if ((property < 0) || (property >= VO_NUM_PROPERTIES)) return 0;
+
if ((value >= this->props[property].min) &&
(value <= this->props[property].max))
{
@@ -853,6 +857,10 @@ static void vidix_get_property_min_max (vo_driver_t *this_gen,
vidix_driver_t *this = (vidix_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;
}
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c
index f098ceed8..b6e272d37 100644
--- a/src/video_out/video_out_xcbxv.c
+++ b/src/video_out/video_out_xcbxv.c
@@ -640,6 +640,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;
@@ -680,6 +682,8 @@ static int xv_set_property (vo_driver_t *this_gen,
int property, int value) {
xv_driver_t *this = (xv_driver_t *) this_gen;
+ if ((property < 0) || (property >= VO_NUM_PROPERTIES)) return 0;
+
if (this->props[property].atom != XCB_NONE) {
xcb_xv_get_port_attribute_cookie_t get_attribute_cookie;
xcb_xv_get_port_attribute_reply_t *get_attribute_reply;
@@ -757,6 +761,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;
}
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;
}
diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c
index 3158840a0..554609dee 100644
--- a/src/video_out/video_out_xvmc.c
+++ b/src/video_out/video_out_xvmc.c
@@ -991,6 +991,8 @@ static int xvmc_get_property (vo_driver_t *this_gen, int property) {
lprintf ("xvmc_get_property\n");
+ if ((property < 0) || (property >= VO_NUM_PROPERTIES)) return 0;
+
switch (property) {
case VO_PROP_WINDOW_WIDTH:
this->props[property].value = this->sc.gui_width;
@@ -1033,6 +1035,8 @@ static int xvmc_set_property (vo_driver_t *this_gen,
lprintf ("xvmc_set_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 */
if((value < this->props[property].min) || (value > this->props[property].max))
@@ -1101,6 +1105,10 @@ static void xvmc_get_property_min_max (vo_driver_t *this_gen,
lprintf ("xvmc_get_property_min_max\n");
+ if ((property < 0) || (property >= VO_NUM_PROPERTIES)) {
+ *min = *max = 0;
+ return;
+ }
*min = this->props[property].min;
*max = this->props[property].max;
}
diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c
index 14fcbce97..d8571e74a 100644
--- a/src/video_out/video_out_xxmc.c
+++ b/src/video_out/video_out_xxmc.c
@@ -1794,6 +1794,8 @@ static void xxmc_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen)
static int xxmc_get_property (vo_driver_t *this_gen, int property) {
xxmc_driver_t *this = (xxmc_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;
@@ -1844,6 +1846,8 @@ static int xxmc_set_property (vo_driver_t *this_gen,
int property, int value) {
xxmc_driver_t *this = (xxmc_driver_t *) this_gen;
+ if ((property < 0) || (property >= VO_NUM_PROPERTIES)) return 0;
+
if (this->props[property].atom != None) {
/* value is out of bound */
@@ -1932,6 +1936,10 @@ static void xxmc_get_property_min_max (vo_driver_t *this_gen,
int property, int *min, int *max) {
xxmc_driver_t *this = (xxmc_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;
}