diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -58,7 +58,6 @@ tee_src_pad_blocked_cb (GstPad *srcpad, TranscodeClientCtx *ctx) { GstCaps *caps; - GstPad *sinkpad; GstBuffer *buffer; GstState state; GstStateChangeReturn ret; @@ -71,8 +70,7 @@ tee_src_pad_blocked_cb (GstPad *srcpad, gst_bin_add (GST_BIN (server_ctx->pipeline), sinkbin); /* t. ! queue ! appsink */ - sinkpad = gst_element_get_static_pad (sinkbin, "qsink"); - gst_pad_link (srcpad, sinkpad); + gst_pad_link (srcpad, ctx->ghostsinkpad); /* Send the WebM stream header through the pipeline first */ caps = gst_pad_get_current_caps (srcpad); @@ -97,7 +95,6 @@ tee_src_pad_blocked_cb (GstPad *srcpad, out: gst_caps_unref (caps); - gst_object_unref (sinkpad); gst_object_unref (sinkbin); return GST_PAD_PROBE_OK; err: @@ -261,7 +258,7 @@ GET: bin = gst_bin_new (NULL); /* queue ! appsink */ - q2 = gst_element_factory_make ("queue", "q2"); + q2 = gst_element_factory_make ("queue", NULL); appsink = gst_element_factory_make ("appsink", NULL); g_object_set (appsink, "drop", FALSE, "emit-signals", TRUE, @@ -270,7 +267,8 @@ GET: gst_element_link (q2, appsink); sinkpadq2 = gst_element_get_static_pad (q2, "sink"); - gst_element_add_pad (bin, gst_ghost_pad_new ("qsink", sinkpadq2)); + client_ctx->ghostsinkpad = gst_ghost_pad_new (NULL, sinkpadq2); + gst_element_add_pad (bin, client_ctx->ghostsinkpad); gst_object_unref (sinkpadq2); /* Set to PAUSED so the bin can pre-roll */ |