mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
Two fixes. The first sets inited to TRUE when we're going into passthrough mode (else, capsnego succeeds and the chai...
Original commit message from CVS: Two fixes. The first sets inited to TRUE when we're going into passthrough mode (else, capsnego succeeds and the chain() function warns that inited != TRUE), and the second check for validity of caps on src side that were entered on sink side before applying. Else, caps1 could be NULL which causes a segfault.
This commit is contained in:
parent
80afd3b002
commit
9bd75f89b7
1 changed files with 7 additions and 0 deletions
|
@ -330,6 +330,7 @@ gst_videoscale_sink_link (GstPad *pad, GstCaps *caps)
|
|||
ret = gst_pad_try_set_caps (videoscale->srcpad, gst_caps_copy(caps));
|
||||
if (ret == GST_PAD_LINK_OK || ret == GST_PAD_LINK_DONE) {
|
||||
videoscale->passthru = TRUE;
|
||||
videoscale->inited = TRUE;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -342,6 +343,12 @@ gst_videoscale_sink_link (GstPad *pad, GstCaps *caps)
|
|||
peercaps = gst_pad_get_allowed_caps(videoscale->srcpad);
|
||||
|
||||
caps1 = gst_caps_intersect(peercaps, srccaps);
|
||||
if (!caps1) {
|
||||
/* apparently, the sink element doesn't like the input of the
|
||||
* source element. The user should add a colorspace converter
|
||||
* or so. */
|
||||
return GST_PAD_LINK_REFUSED;
|
||||
}
|
||||
|
||||
if (!GST_CAPS_IS_FIXED (caps1)) {
|
||||
/* FIXME */
|
||||
|
|
Loading…
Reference in a new issue