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