diff --git a/ChangeLog b/ChangeLog index 4899d4c1b4..4a2b6ca73a 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 ab8d8b6762..f2c10e5fa3 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 */