[0.11] gst-plugins-base: playsink: fix caps negotiation through the new convenience bins
Wim Taymans
wtay at kemper.freedesktop.org
Sat Oct 8 02:05:46 PDT 2011
Module: gst-plugins-base
Branch: 0.11
Commit: 8d617f403769f4f2519de72c3d7e267ee850b123
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=8d617f403769f4f2519de72c3d7e267ee850b123
Author: Vincent Penquerc'h <vincent.penquerch at collabora.co.uk>
Date: Thu Oct 6 15:38:49 2011 +0100
playsink: fix caps negotiation through the new convenience bins
The bins' getcaps was bypassing the inner elements, and thus
failing to account for the caps transformations they allow,
which caused YUV video pipelines to fail with ximagesink, which
does not support YUV, even though the convenience bin includes
a colorspace converter for just this purpose.
https://bugzilla.gnome.org/show_bug.cgi?id=660816
---
gst/playback/gstplaysinkaudioconvert.c | 5 +----
gst/playback/gstplaysinkvideoconvert.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/gst/playback/gstplaysinkaudioconvert.c b/gst/playback/gstplaysinkaudioconvert.c
index 8e405d2..2c28c6e 100644
--- a/gst/playback/gstplaysinkaudioconvert.c
+++ b/gst/playback/gstplaysinkaudioconvert.c
@@ -351,10 +351,7 @@ gst_play_sink_audio_convert_getcaps (GstPad * pad)
GstPad *otherpad, *peer;
GST_PLAY_SINK_AUDIO_CONVERT_LOCK (self);
- if (pad == self->srcpad)
- otherpad = gst_object_ref (self->sinkpad);
- else
- otherpad = gst_object_ref (self->srcpad);
+ otherpad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad));
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
peer = gst_pad_get_peer (otherpad);
diff --git a/gst/playback/gstplaysinkvideoconvert.c b/gst/playback/gstplaysinkvideoconvert.c
index cf765ce..8b22a64 100644
--- a/gst/playback/gstplaysinkvideoconvert.c
+++ b/gst/playback/gstplaysinkvideoconvert.c
@@ -331,10 +331,7 @@ gst_play_sink_video_convert_getcaps (GstPad * pad)
GstPad *otherpad, *peer;
GST_PLAY_SINK_VIDEO_CONVERT_LOCK (self);
- if (pad == self->srcpad)
- otherpad = gst_object_ref (self->sinkpad);
- else
- otherpad = gst_object_ref (self->srcpad);
+ otherpad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad));
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
peer = gst_pad_get_peer (otherpad);
More information about the gstreamer-commits
mailing list