From f0ce6a40ade58a9224915c859143506369f27843 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 21 Aug 2008 11:17:05 +0000 Subject: [PATCH] libs/gst/base/gstbasesrc.c: Use the result from gst_pad_set_caps() instead of assuming the element always accepted th... Original commit message from CVS: * libs/gst/base/gstbasesrc.c: (gst_base_src_default_negotiate): Use the result from gst_pad_set_caps() instead of assuming the element always accepted the caps computed by the default negotiate function. --- ChangeLog | 6 ++++++ libs/gst/base/gstbasesrc.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8956b7dd50..abc62629c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-21 Wim Taymans + + * libs/gst/base/gstbasesrc.c: (gst_base_src_default_negotiate): + Use the result from gst_pad_set_caps() instead of assuming the element + always accepted the caps computed by the default negotiate function. + 2008-08-20 Wim Taymans * docs/libs/gstreamer-libs-sections.txt: diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 4d8b811ca8..8d1392e366 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -2303,9 +2303,9 @@ gst_base_src_default_negotiate (GstBaseSrc * basesrc) * nego is not needed */ result = TRUE; } else if (gst_caps_is_fixed (caps)) { - /* yay, fixed caps, use those then */ - gst_pad_set_caps (GST_BASE_SRC_PAD (basesrc), caps); - result = TRUE; + /* yay, fixed caps, use those then, it's possible that the subclass does + * not accept this caps after all and we have to fail. */ + result = gst_pad_set_caps (GST_BASE_SRC_PAD (basesrc), caps); } } gst_caps_unref (caps);