diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2008-02-12 13:34:52 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2008-02-12 13:34:52 +0000 |
commit | 361c3c94c311b2914dd91c70480d8341db7f70c0 (patch) | |
tree | f1e7294c97a0339b96b31e91fd0afb7c41126db0 | |
parent | d62d8d9feaf027ffa359be07fa4b400da3648940 (diff) |
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
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | sys/ximage/gstximagesrc.c | 8 |
2 files changed, 13 insertions, 3 deletions
@@ -1,3 +1,11 @@ +2008-02-12 Jan Schmidt <jan.schmidt@sun.com> + + * 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 <slomo@circular-chaos.org> * sys/directdraw/gstdirectdrawsink.c: diff --git a/sys/ximage/gstximagesrc.c b/sys/ximage/gstximagesrc.c index 89b5838a..14227f80 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); } |