mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-04 22:48:54 +00:00
gst/base/gstbasesrc.c: Send discont event from the loop function, as pads aren't activated yet in the activate_push h...
Original commit message from CVS: * gst/base/gstbasesrc.c: (gst_base_src_loop), (gst_base_src_activate_push): Send discont event from the loop function, as pads aren't activated yet in the activate_push handler. * gst/gstbin.c: (bin_bus_handler): Don't leak element name.
This commit is contained in:
parent
2fca81335d
commit
518e590f8b
5 changed files with 29 additions and 10 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2005-07-19 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* gst/base/gstbasesrc.c: (gst_base_src_loop),
|
||||
(gst_base_src_activate_push):
|
||||
Send discont event from the loop function, as pads
|
||||
aren't activated yet in the activate_push handler.
|
||||
|
||||
* gst/gstbin.c: (bin_bus_handler):
|
||||
Don't leak element name.
|
||||
|
||||
2005-07-18 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* configure.ac: Use AS_LIBTOOL_TAGS.
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit eaed65b6bf08986131bfa3bcb15e88d6e2106a51
|
||||
Subproject commit 6f9b691adc2a0300598311671dd7c4d9d2035afa
|
|
@ -656,6 +656,12 @@ gst_base_src_loop (GstPad * pad)
|
|||
|
||||
src = GST_BASE_SRC (GST_OBJECT_PARENT (pad));
|
||||
|
||||
if (src->offset == 0) {
|
||||
/* now send discont */
|
||||
if (!gst_base_src_send_discont (src))
|
||||
goto eos;
|
||||
}
|
||||
|
||||
ret = gst_base_src_get_range (pad, src->offset, src->blocksize, &buf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto eos;
|
||||
|
@ -956,9 +962,6 @@ gst_base_src_activate_push (GstPad * pad, gboolean active)
|
|||
if (!gst_base_src_start (basesrc))
|
||||
goto error_start;
|
||||
|
||||
/* now send discont */
|
||||
gst_base_src_send_discont (basesrc);
|
||||
|
||||
return gst_pad_start_task (pad, (GstTaskFunction) gst_base_src_loop, pad);
|
||||
} else {
|
||||
return gst_base_src_deactivate (basesrc, pad);
|
||||
|
|
|
@ -1405,9 +1405,11 @@ bin_bus_handler (GstBus * bus, GstMessage * message, GstBin * bin)
|
|||
/* we don't want messages from the streaming thread while we're doing the
|
||||
* state change. We do want them from the state change functions. */
|
||||
switch (GST_MESSAGE_TYPE (message)) {
|
||||
case GST_MESSAGE_EOS:
|
||||
GST_DEBUG_OBJECT (bin, "got EOS message from %s",
|
||||
gst_object_get_name (GST_MESSAGE_SRC (message)));
|
||||
case GST_MESSAGE_EOS:{
|
||||
gchar *name = gst_object_get_name (GST_MESSAGE_SRC (message));
|
||||
|
||||
GST_DEBUG_OBJECT (bin, "got EOS message from %s", name);
|
||||
g_free (name);
|
||||
|
||||
GST_LOCK (bin->child_bus);
|
||||
bin->eosed = g_list_prepend (bin->eosed, GST_MESSAGE_SRC (message));
|
||||
|
@ -1422,6 +1424,7 @@ bin_bus_handler (GstBus * bus, GstMessage * message, GstBin * bin)
|
|||
/* we drop all EOS messages */
|
||||
gst_message_unref (message);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
/* Send all other messages upward */
|
||||
GST_DEBUG_OBJECT (bin, "posting message upward");
|
||||
|
|
|
@ -656,6 +656,12 @@ gst_base_src_loop (GstPad * pad)
|
|||
|
||||
src = GST_BASE_SRC (GST_OBJECT_PARENT (pad));
|
||||
|
||||
if (src->offset == 0) {
|
||||
/* now send discont */
|
||||
if (!gst_base_src_send_discont (src))
|
||||
goto eos;
|
||||
}
|
||||
|
||||
ret = gst_base_src_get_range (pad, src->offset, src->blocksize, &buf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto eos;
|
||||
|
@ -956,9 +962,6 @@ gst_base_src_activate_push (GstPad * pad, gboolean active)
|
|||
if (!gst_base_src_start (basesrc))
|
||||
goto error_start;
|
||||
|
||||
/* now send discont */
|
||||
gst_base_src_send_discont (basesrc);
|
||||
|
||||
return gst_pad_start_task (pad, (GstTaskFunction) gst_base_src_loop, pad);
|
||||
} else {
|
||||
return gst_base_src_deactivate (basesrc, pad);
|
||||
|
|
Loading…
Reference in a new issue