From 361c3c94c311b2914dd91c70480d8341db7f70c0 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Tue, 12 Feb 2008 13:34:52 +0000 Subject: [PATCH] sys/ximage/gstximagesrc.c: Initialise variables when opening the X display rather than in _start(), as the display ca... Original commit message from CVS: * sys/ximage/gstximagesrc.c: Initialise variables when opening the X display rather than in _start(), as the display can be opened before that. Fixes: #515985 --- ChangeLog | 8 ++++++++ sys/ximage/gstximagesrc.c | 8 +++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index dac0094..5357a0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-02-12 Jan Schmidt + + * sys/ximage/gstximagesrc.c: + Initialise variables when opening the X display rather + than in _start(), as the display can be opened before that. + + Fixes: #515985 + 2008-02-12 Sebastian Dröge * sys/directdraw/gstdirectdrawsink.c: diff --git a/sys/ximage/gstximagesrc.c b/sys/ximage/gstximagesrc.c index 89b5838..14227f8 100644 --- a/sys/ximage/gstximagesrc.c +++ b/sys/ximage/gstximagesrc.c @@ -161,6 +161,11 @@ gst_ximage_src_open_display (GstXImageSrc * s, const gchar * name) int error_base; long evmask = NoEventMask; + s->have_xdamage = FALSE; + s->damage = None; + s->damage_copy_gc = None; + s->damage_region = None; + if (XDamageQueryExtension (s->xcontext->disp, &s->damage_event_base, &error_base)) { s->damage = @@ -206,9 +211,6 @@ gst_ximage_src_start (GstBaseSrc * basesrc) s->last_frame_no = -1; #ifdef HAVE_XDAMAGE s->last_ximage = NULL; - s->damage = None; - s->damage_copy_gc = None; - s->damage_region = None; #endif return gst_ximage_src_open_display (s, s->display_name); } -- 2.7.4