diff options
Diffstat (limited to 'src/video_out/video_out_xvmc.c')
-rw-r--r-- | src/video_out/video_out_xvmc.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |