mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
ext/libvisual/visual.c: When negotiating, actually start from a format that we can support instead of from the too ge...
Original commit message from CVS: * ext/libvisual/visual.c: (gst_vis_src_negotiate): When negotiating, actually start from a format that we can support instead of from the too generic template.
This commit is contained in:
parent
472162d1b1
commit
bdf20026e8
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-02-29 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* ext/libvisual/visual.c: (gst_vis_src_negotiate):
|
||||||
|
When negotiating, actually start from a format that we can support
|
||||||
|
instead of from the too generic template.
|
||||||
|
|
||||||
2008-02-29 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-02-29 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
* gst/playback/gstplaybin2.c: (gst_play_bin_set_property):
|
* gst/playback/gstplaybin2.c: (gst_play_bin_set_property):
|
||||||
|
|
|
@ -387,15 +387,16 @@ gst_vis_src_negotiate (GstVisual * visual)
|
||||||
{
|
{
|
||||||
GstCaps *othercaps, *target, *intersect;
|
GstCaps *othercaps, *target, *intersect;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
const GstCaps *templ;
|
GstCaps *caps;
|
||||||
|
|
||||||
templ = gst_pad_get_pad_template_caps (visual->srcpad);
|
caps = gst_pad_get_caps (visual->srcpad);
|
||||||
|
|
||||||
/* see what the peer can do */
|
/* see what the peer can do */
|
||||||
othercaps = gst_pad_peer_get_caps (visual->srcpad);
|
othercaps = gst_pad_peer_get_caps (visual->srcpad);
|
||||||
if (othercaps) {
|
if (othercaps) {
|
||||||
intersect = gst_caps_intersect (othercaps, templ);
|
intersect = gst_caps_intersect (othercaps, caps);
|
||||||
gst_caps_unref (othercaps);
|
gst_caps_unref (othercaps);
|
||||||
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
if (gst_caps_is_empty (intersect))
|
if (gst_caps_is_empty (intersect))
|
||||||
goto no_format;
|
goto no_format;
|
||||||
|
@ -404,7 +405,8 @@ gst_vis_src_negotiate (GstVisual * visual)
|
||||||
gst_caps_unref (intersect);
|
gst_caps_unref (intersect);
|
||||||
} else {
|
} else {
|
||||||
/* need a copy, we'll be modifying it when fixating */
|
/* need a copy, we'll be modifying it when fixating */
|
||||||
target = gst_caps_copy (templ);
|
target = gst_caps_copy (caps);
|
||||||
|
gst_caps_unref (caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fixate in case something is not fixed. This does nothing if the value is
|
/* fixate in case something is not fixed. This does nothing if the value is
|
||||||
|
|
Loading…
Reference in a new issue