mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
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
This commit is contained in:
parent
611a62ee51
commit
99557bbd28
3 changed files with 21 additions and 11 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
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>
|
||||
|
||||
* ext/jpeg/gstsmokedec.c: (gst_smokedec_chain):
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue