diff --git a/ChangeLog b/ChangeLog index eca2fb8472..4f74d7782f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-08-10 Thomas Vander Stichele + + Patch by: Edward Hervey + + * configure.ac: + * gst/wavparse/gstwavparse.c: (gst_wavparse_perform_seek), + (gst_wavparse_stream_data): + Send the newsegment event in the streaming thread. + Fixes #347529 + 2006-08-08 Tim-Philipp Müller * ext/jpeg/gstsmokedec.c: (gst_smokedec_chain): diff --git a/configure.ac b/configure.ac index 6e20b9587c..f8a5711675 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file dnl initialize autoconf dnl releases only do -Wall, cvs and prerelease does -Werror too dnl use a three digit version number for releases, and four for cvs/pre -AC_INIT(GStreamer Good Plug-ins, 0.10.3.1, +AC_INIT(GStreamer Good Plug-ins, 0.10.3.2, http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer, gst-plugins-good) diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 48d244a04f..2e606dfef0 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -776,7 +776,6 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) { gboolean res; gdouble rate; - GstEvent *newsegment; GstFormat format, bformat; GstSeekFlags flags; GstSeekType cur_type = GST_SEEK_TYPE_NONE, stop_type; @@ -910,18 +909,13 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) GST_DEBUG_OBJECT (wav, "Sending newsegment from %" G_GINT64_FORMAT " to %" G_GINT64_FORMAT, wav->segment.start, stop); - newsegment = + /* store the newsegment event so it can be sent from the streaming thread. */ + if (wav->newsegment) + gst_event_unref (wav->newsegment); + wav->newsegment = gst_event_new_new_segment (FALSE, wav->segment.rate, wav->segment.format, wav->segment.last_stop, stop, wav->segment.time); - if (wav->srcpad) { - gst_pad_push_event (wav->srcpad, newsegment); - } else { - /* send later when we actually create the source pad */ - g_assert (wav->newsegment == NULL); - wav->newsegment = newsegment; - } - wav->segment_running = TRUE; if (!wav->streaming) { gst_pad_start_task (wav->sinkpad, (GstTaskFunction) gst_wavparse_loop, @@ -1482,6 +1476,12 @@ iterate_adapter: gst_wavparse_add_src_pad (wav, buf); } + /* If we have a pending newsegment send it now. */ + if (G_UNLIKELY (wav->newsegment != NULL)) { + gst_pad_push_event (wav->srcpad, wav->newsegment); + wav->newsegment = NULL; + } + obtained = GST_BUFFER_SIZE (buf); /* our positions */