libs/gst/base/gstbasesink.c (gst_base_sink_negotiate_pull): Don't set_caps() if the result of fixating is ANY, as it'...

Original commit message from CVS:
2007-01-12  Andy Wingo  <wingo@pobox.com>

* libs/gst/base/gstbasesink.c (gst_base_sink_negotiate_pull):
Don't set_caps() if the result of fixating is ANY, as it's not
supported, and not necessary in the case of a link with no
template caps on either side. Fixes tests/check/libs/basesrc in
some pull-mode tests.
This commit is contained in:
Andy Wingo 2007-01-12 18:06:29 +00:00
parent a173768706
commit 5cd94e7afc
2 changed files with 15 additions and 2 deletions

View file

@ -1,5 +1,11 @@
2007-01-12 Andy Wingo <wingo@pobox.com> 2007-01-12 Andy Wingo <wingo@pobox.com>
* libs/gst/base/gstbasesink.c (gst_base_sink_negotiate_pull):
Don't set_caps() if the result of fixating is ANY, as it's not
supported, and not necessary in the case of a link with no
template caps on either side. Fixes tests/check/libs/basesrc in
some pull-mode tests.
* libs/gst/base/gstbasetransform.c (_GstBaseTransformPrivate): * libs/gst/base/gstbasetransform.c (_GstBaseTransformPrivate):
(gst_base_transform_init, gst_base_transform_sink_activate_push) (gst_base_transform_init, gst_base_transform_sink_activate_push)
(gst_base_transform_src_activate_pull): (gst_base_transform_src_activate_pull):

View file

@ -2251,8 +2251,15 @@ gst_base_sink_negotiate_pull (GstBaseSink * basesink)
caps = gst_caps_make_writable (caps); caps = gst_caps_make_writable (caps);
gst_pad_fixate_caps (pad, caps); gst_pad_fixate_caps (pad, caps);
if (gst_caps_is_any (caps)) {
GST_DEBUG_OBJECT (basesink, "caps were ANY after fixating, "
"allowing pull()");
/* neither side has template caps in this case, so they are prepared for
pull() without setcaps() */
} else {
if (!gst_pad_set_caps (pad, caps)) if (!gst_pad_set_caps (pad, caps))
goto could_not_set_caps; goto could_not_set_caps;
}
gst_caps_unref (caps); gst_caps_unref (caps);
gst_object_unref (pad); gst_object_unref (pad);