mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
sys/ximage/gstximagesrc.c: Free allocated Damage memory before closing our connection to the
Original commit message from CVS: * sys/ximage/gstximagesrc.c: Free allocated Damage memory before closing our connection to the X server. Fixes: #515706
This commit is contained in:
parent
a0a9fe66fe
commit
ababb87313
2 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-02-12 Jan Schmidt <jan.schmidt@sun.com>
|
||||
|
||||
* sys/ximage/gstximagesrc.c:
|
||||
Free allocated Damage memory before closing our connection to the
|
||||
X server. Fixes: #515706
|
||||
|
||||
2008-02-12 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* ext/jpeg/gstsmokeenc.c: (gst_smokeenc_chain):
|
||||
|
|
|
@ -206,6 +206,9 @@ 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);
|
||||
}
|
||||
|
@ -219,6 +222,22 @@ gst_ximage_src_stop (GstBaseSrc * basesrc)
|
|||
|
||||
if (src->xcontext) {
|
||||
g_mutex_lock (src->x_lock);
|
||||
|
||||
#ifdef HAVE_XDAMAGE
|
||||
if (src->damage_copy_gc != None) {
|
||||
XFreeGC (src->xcontext->disp, src->damage_copy_gc);
|
||||
src->damage_copy_gc = None;
|
||||
}
|
||||
if (src->damage_region != None) {
|
||||
XFixesDestroyRegion (src->xcontext->disp, src->damage_region);
|
||||
src->damage_region = None;
|
||||
}
|
||||
if (src->damage != None) {
|
||||
XDamageDestroy (src->xcontext->disp, src->damage);
|
||||
src->damage = None;
|
||||
}
|
||||
#endif
|
||||
|
||||
ximageutil_xcontext_clear (src->xcontext);
|
||||
src->xcontext = NULL;
|
||||
g_mutex_unlock (src->x_lock);
|
||||
|
|
Loading…
Reference in a new issue