encodebin: activate ghost pad after creating it
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 14 Feb 2013 15:59:51 +0000 (15:59 +0000)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 14 Feb 2013 16:07:48 +0000 (16:07 +0000)
This ensures the ghost pad will not stay in flushing mode
when it receives a flush stop event, and generally behave
badly.

This fixes at least one case of a dynamic decodebin2 + encodebin
pipeline finding a source that has not prerolled when it should
have been (due to the ghostpad staying in flushing mode).

gst/encoding/gstencodebin.c

index 96bb4b9..dd49c43 100644 (file)
@@ -494,6 +494,7 @@ gst_encode_bin_init (GstEncodeBin * encode_bin)
   tmpl = gst_static_pad_template_get (&muxer_src_template);
   encode_bin->srcpad = gst_ghost_pad_new_no_target_from_template ("src", tmpl);
   gst_object_unref (tmpl);
+  gst_pad_set_active (encode_bin->srcpad, TRUE);
   gst_element_add_pad (GST_ELEMENT_CAST (encode_bin), encode_bin->srcpad);
 }