+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.
-Subproject commit eaed65b6bf08986131bfa3bcb15e88d6e2106a51
+Subproject commit 6f9b691adc2a0300598311671dd7c4d9d2035afa
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;
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);
/* 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));
/* we drop all EOS messages */
gst_message_unref (message);
break;
+ }
default:
/* Send all other messages upward */
GST_DEBUG_OBJECT (bin, "posting message upward");
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;
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);