[banshee] libbanshee: Fix bad call to gst_element_get_request_pad (bgo#646347)
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] libbanshee: Fix bad call to gst_element_get_request_pad (bgo#646347)
- Date: Thu, 31 Mar 2011 15:43:32 +0000 (UTC)
commit 9fb59c0a2954817cfa196b679e7f699f5bd01833
Author: Gabriel Burt <gabriel burt gmail com>
Date: Thu Mar 31 10:27:12 2011 -0500
libbanshee: Fix bad call to gst_element_get_request_pad (bgo#646347)
We were hardcoding the name of the src to return, instead of passing
'src%d'. GStreamer used to ignore it, but now complains loudly.
libbanshee/banshee-player-pipeline.c | 6 +++++-
libbanshee/banshee-player-vis.c | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/libbanshee/banshee-player-pipeline.c b/libbanshee/banshee-player-pipeline.c
index e0b3759..71f221d 100644
--- a/libbanshee/banshee-player-pipeline.c
+++ b/libbanshee/banshee-player-pipeline.c
@@ -276,6 +276,7 @@ _bp_pipeline_construct (BansheePlayer *player)
GValue value = {0};
GstBus *bus;
GstPad *teepad;
+ GstPad *pad;
GstElement *audiosink;
GstElement *audiosinkqueue;
GstElement *eq_audioconvert = NULL;
@@ -413,7 +414,10 @@ _bp_pipeline_construct (BansheePlayer *player)
g_value_unset (&value);
// Link the first tee pad to the primary audio sink queue
- gst_pad_link (gst_element_get_request_pad (player->audiotee, "src0"), sinkpad);
+ pad = gst_element_get_request_pad (player->audiotee, "src%d");
+ gst_pad_link (pad, sinkpad);
+ gst_object_unref (GST_OBJECT (pad));
+
// Now allow specialized pipeline setups
_bp_cdda_pipeline_setup (player);
_bp_video_pipeline_setup (player, bus);
diff --git a/libbanshee/banshee-player-vis.c b/libbanshee/banshee-player-vis.c
index e3c3ebb..5c7d5fe 100644
--- a/libbanshee/banshee-player-vis.c
+++ b/libbanshee/banshee-player-vis.c
@@ -199,6 +199,7 @@ _bp_vis_pipeline_setup (BansheePlayer *player)
GstElement *fakesink, *converter, *resampler, *audiosinkqueue;
GstCaps *caps;
+ GstPad *teepad;
GstPad *pad;
gint wanted_size;
@@ -256,7 +257,9 @@ _bp_vis_pipeline_setup (BansheePlayer *player)
converter, fakesink, NULL);
pad = gst_element_get_static_pad (audiosinkqueue, "sink");
- gst_pad_link (gst_element_get_request_pad (player->audiotee, "src%d"), pad);
+ teepad = gst_element_get_request_pad (player->audiotee, "src%d");
+ gst_pad_link (teepad, pad);
+ gst_object_unref (GST_OBJECT (teepad));
gst_object_unref (GST_OBJECT (pad));
gst_element_link_many (audiosinkqueue, resampler, converter, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]