From c2a54d0b5a295e3e89f3637d0724755c1c7a93e8 Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Thu, 11 Jul 2013 15:21:44 +0900 Subject: [PATCH] [xvimagesink] Fix seg.fault when user set visible property in case of pixmap usage Change-Id: Iafb9091ac35f8d809f9a50cccc224923e10470cd --- packaging/gst-plugins-base.spec | 2 +- sys/xvimage/xvimagesink.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packaging/gst-plugins-base.spec b/packaging/gst-plugins-base.spec index e94f082..605b970 100644 --- a/packaging/gst-plugins-base.spec +++ b/packaging/gst-plugins-base.spec @@ -1,7 +1,7 @@ Name: gst-plugins-base Summary: GStreamer streaming media framework base plug-ins Version: 0.10.36 -Release: 28 +Release: 29 Group: Applications/Multimedia License: LGPLv2+ Source0: %{name}-%{version}.tar.gz diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 38313f9..6269ff5 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -5564,7 +5564,13 @@ gst_xvimagesink_set_property (GObject * object, guint prop_id, } #endif xvimagesink->visible = g_value_get_boolean (value); - XvStopVideo(xvimagesink->xcontext->disp, xvimagesink->xcontext->xv_port_id, xvimagesink->xwindow->win); + if ( xvimagesink->get_pixmap_cb ) { + if (xvimagesink->xpixmap[0] && xvimagesink->xpixmap[0]->pixmap) { + XvStopVideo (xvimagesink->xcontext->disp, xvimagesink->xcontext->xv_port_id, xvimagesink->xpixmap[0]->pixmap); + } + } else { + XvStopVideo(xvimagesink->xcontext->disp, xvimagesink->xcontext->xv_port_id, xvimagesink->xwindow->win); + } XSync( xvimagesink->xcontext->disp, FALSE ); } else { GST_WARNING_OBJECT( xvimagesink, "xcontext is null, failed to set visible"); -- 2.7.4