summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_xv.c
diff options
context:
space:
mode:
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;
}