Commit 99557bbd authored by Edward Hervey's avatar Edward Hervey Committed by Thomas Vander Stichele
Browse files

Send the newsegment event in the streaming thread.

Original commit message from CVS:
Patch by: Edward Hervey <edward@fluendo.com>
* configure.ac:
* gst/wavparse/gstwavparse.c: (gst_wavparse_perform_seek),
(gst_wavparse_stream_data):
Send the newsegment event in the streaming thread.
Fixes #347529
parent 611a62ee
2006-08-10 Thomas Vander Stichele <thomas at apestaart dot org>
Patch by: Edward Hervey <edward@fluendo.com>
* 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 <tim at centricular dot net> 2006-08-08 Tim-Philipp Müller <tim at centricular dot net>
* ext/jpeg/gstsmokedec.c: (gst_smokedec_chain): * ext/jpeg/gstsmokedec.c: (gst_smokedec_chain):
......
...@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file ...@@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file
dnl initialize autoconf dnl initialize autoconf
dnl releases only do -Wall, cvs and prerelease does -Werror too 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 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, http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
gst-plugins-good) gst-plugins-good)
......
...@@ -776,7 +776,6 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) ...@@ -776,7 +776,6 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
{ {
gboolean res; gboolean res;
gdouble rate; gdouble rate;
GstEvent *newsegment;
GstFormat format, bformat; GstFormat format, bformat;
GstSeekFlags flags; GstSeekFlags flags;
GstSeekType cur_type = GST_SEEK_TYPE_NONE, stop_type; GstSeekType cur_type = GST_SEEK_TYPE_NONE, stop_type;
...@@ -910,18 +909,13 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) ...@@ -910,18 +909,13 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event)
GST_DEBUG_OBJECT (wav, "Sending newsegment from %" G_GINT64_FORMAT GST_DEBUG_OBJECT (wav, "Sending newsegment from %" G_GINT64_FORMAT
" to %" G_GINT64_FORMAT, wav->segment.start, stop); " 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, gst_event_new_new_segment (FALSE, wav->segment.rate,
wav->segment.format, wav->segment.last_stop, stop, wav->segment.time); 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; wav->segment_running = TRUE;
if (!wav->streaming) { if (!wav->streaming) {
gst_pad_start_task (wav->sinkpad, (GstTaskFunction) gst_wavparse_loop, gst_pad_start_task (wav->sinkpad, (GstTaskFunction) gst_wavparse_loop,
...@@ -1482,6 +1476,12 @@ iterate_adapter: ...@@ -1482,6 +1476,12 @@ iterate_adapter:
gst_wavparse_add_src_pad (wav, buf); 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); obtained = GST_BUFFER_SIZE (buf);
/* our positions */ /* our positions */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment