> On Sun, 2007-05-20 at 23:55 +0200, Javier Kohen wrote: > > Attempting to play a movie with subtitles when using the gstreamer > > backend gives the following error on the console and the movie won't > > play. > > > > ** Message: Error: Internal data flow error. > > gstbasesrc.c(1642): gst_base_src_loop (): /play/subtitle-bin/filesrc0: > > streaming task paused, reason not-linked (-1)
Awesome, this was fixed upstream yesterday. I'm attaching the patch here if there's interest in fixing this before a new upstream release is made. -- Cheers, Sven Arvidsson http://www.whiz.se PGP Key ID 760BDD22
diff -Nur gst-plugins-base0.10-0.10.12/gst/playback/gstplaybin.c gst-plugins-base0.10-0.10.12.new/gst/playback/gstplaybin.c
--- gst-plugins-base0.10-0.10.12/gst/playback/gstplaybin.c 2007-03-05 12:13:29.000000000 +0100
+++ gst-plugins-base0.10-0.10.12.new/gst/playback/gstplaybin.c 2007-05-23 20:06:20.000000000 +0200
@@ -1417,7 +1417,8 @@
/* this is only for debugging */
parent = gst_pad_get_parent_element (srcpad);
if (parent) {
- GST_DEBUG ("Adding sink with state %d (parent: %d, peer: %d)",
+ GST_DEBUG ("Adding sink %" GST_PTR_FORMAT
+ " with state %d (parent: %d, peer: %d)", sink,
GST_STATE (sink), GST_STATE (play_bin), GST_STATE (parent));
gst_object_unref (parent);
}
@@ -1506,6 +1507,11 @@
}
}
+static void
+dummy_blocked_cb (GstPad *pad, gboolean blocked, gpointer user_data)
+{
+}
+
static gboolean
setup_sinks (GstPlayBaseBin * play_base_bin, GstPlayBaseGroup * group)
{
@@ -1513,7 +1519,7 @@
GList *streaminfo = NULL, *s;
gboolean need_vis = FALSE;
gboolean need_text = FALSE;
- GstPad *textsrcpad = NULL, *pad = NULL;
+ GstPad *textsrcpad = NULL, *pad = NULL, *origtextsrcpad = NULL;
GstElement *sink;
gboolean res = TRUE;
@@ -1570,6 +1576,7 @@
textsrcpad =
gst_element_get_pad (group->type[GST_STREAM_TYPE_TEXT - 1].preroll,
"src");
+
/* This pad is from subtitle-bin, we need to create a ghost pad to have
common grandparents */
parent = gst_object_get_parent (GST_OBJECT_CAST (textsrcpad));
@@ -1594,6 +1601,11 @@
if (!GST_IS_PLAY_BIN (grandparent)) {
GST_DEBUG_OBJECT (textsrcpad, "this subtitle pad is from a subtitle "
"file, ghosting to a suitable hierarchy");
+ /* Block the pad first, because as soon as we add a ghostpad, the queue
+ * will try and start pushing */
+ gst_pad_set_blocked_async (textsrcpad, TRUE, dummy_blocked_cb, NULL);
+ origtextsrcpad = gst_object_ref (textsrcpad);
+
ghost = gst_ghost_pad_new ("text_src", textsrcpad);
if (!GST_IS_PAD (ghost)) {
GST_WARNING_OBJECT (textsrcpad, "failed creating ghost pad for "
@@ -1635,6 +1647,10 @@
gst_object_unref (pad);
if (textsrcpad)
gst_object_unref (textsrcpad);
+ if (origtextsrcpad) {
+ gst_pad_set_blocked_async (origtextsrcpad, FALSE, dummy_blocked_cb, NULL);
+ gst_object_unref (origtextsrcpad);
+ }
}
/* remove the sinks now, pipeline get_state will now wait for the
signature.asc
Description: This is a digitally signed message part

