From: Tim-Philipp Müller Date: Sat, 21 Apr 2007 13:27:16 +0000 (+0000) Subject: libs/gst/base/gstbasetransform.c: Make sure streaming has finished before calling... X-Git-Tag: RELEASE-0_10_13~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74861f2d0e317d7af5c8531f574c16c31231ba8e;p=platform%2Fupstream%2Fgstreamer.git libs/gst/base/gstbasetransform.c: Make sure streaming has finished before calling the ::stop() vfunc, since that vfun... Original commit message from CVS: * libs/gst/base/gstbasetransform.c: (gst_base_transform_activate): Make sure streaming has finished before calling the ::stop() vfunc, since that vfunc might clear state which is being used in the streaming thread. This fixes a race that caused crashes in audioresample when shutting down a pipeline (#420106). --- diff --git a/ChangeLog b/ChangeLog index 4899d4c..4a2b6ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-04-21 Tim-Philipp Müller + + * libs/gst/base/gstbasetransform.c: (gst_base_transform_activate): + Make sure streaming has finished before calling the ::stop() vfunc, + since that vfunc might clear state which is being used in the + streaming thread. This fixes a race that caused crashes in + audioresample when shutting down a pipeline (#420106). + 2007-04-20 Stefan Kost * docs/gst/gstreamer-sections.txt: diff --git a/libs/gst/base/gstbasetransform.c b/libs/gst/base/gstbasetransform.c index ab8d8b6..f2c10e5 100644 --- a/libs/gst/base/gstbasetransform.c +++ b/libs/gst/base/gstbasetransform.c @@ -1670,6 +1670,11 @@ gst_base_transform_activate (GstBaseTransform * trans, gboolean active) GST_OBJECT_UNLOCK (trans); } else { + /* We must make sure streaming has finished before resetting things + * and calling the ::stop vfunc */ + GST_PAD_STREAM_LOCK (trans->sinkpad); + GST_PAD_STREAM_UNLOCK (trans->sinkpad); + trans->have_same_caps = FALSE; /* We can only reset the passthrough mode if the instance told us to handle it in configure_caps */