playsink: consider both passthrough and converter caps in getcaps
Since we can switch between both modes. https://bugzilla.gnome.org/show_bug.cgi?id=661262
This commit is contained in:
parent
b34dac9a87
commit
3939457b00
@ -343,33 +343,28 @@ gst_play_sink_convert_bin_getcaps (GstPad * pad)
|
|||||||
GstPad *otherpad, *peer;
|
GstPad *otherpad, *peer;
|
||||||
|
|
||||||
GST_PLAY_SINK_CONVERT_BIN_LOCK (self);
|
GST_PLAY_SINK_CONVERT_BIN_LOCK (self);
|
||||||
otherpad = gst_ghost_pad_get_target (GST_GHOST_PAD_CAST (pad));
|
if (pad == self->srcpad) {
|
||||||
if (!otherpad) {
|
otherpad = self->sinkpad;
|
||||||
if (pad == self->srcpad) {
|
} else if (pad == self->sinkpad) {
|
||||||
otherpad = self->sink_proxypad;
|
otherpad = self->srcpad;
|
||||||
} else if (pad == self->sinkpad) {
|
} else {
|
||||||
otherpad =
|
GST_ERROR_OBJECT (pad, "Not one of our pads");
|
||||||
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD
|
otherpad = NULL;
|
||||||
(self->sinkpad)));
|
|
||||||
} else {
|
|
||||||
GST_ERROR_OBJECT (pad, "Not one of our pads");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
GST_PLAY_SINK_CONVERT_BIN_UNLOCK (self);
|
|
||||||
|
|
||||||
if (otherpad) {
|
if (otherpad) {
|
||||||
peer = gst_pad_get_peer (otherpad);
|
peer = gst_pad_get_peer (otherpad);
|
||||||
if (peer) {
|
if (peer) {
|
||||||
ret = gst_pad_get_caps_reffed (peer);
|
GstCaps *peer_caps = gst_pad_get_caps_reffed (peer);
|
||||||
gst_object_unref (peer);
|
gst_object_unref (peer);
|
||||||
|
ret = gst_caps_union (peer_caps, self->converter_caps);
|
||||||
|
gst_caps_unref (peer_caps);
|
||||||
} else {
|
} else {
|
||||||
ret = gst_caps_new_any ();
|
ret = gst_caps_ref (self->converter_caps);
|
||||||
}
|
}
|
||||||
gst_object_unref (otherpad);
|
|
||||||
} else {
|
|
||||||
GST_WARNING_OBJECT (self, "Could not traverse bin");
|
|
||||||
ret = gst_caps_new_any ();
|
|
||||||
}
|
}
|
||||||
|
GST_PLAY_SINK_CONVERT_BIN_UNLOCK (self);
|
||||||
|
|
||||||
gst_object_unref (self);
|
gst_object_unref (self);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user