From 6bae6b825318b8afb91d78b454e70e66dd6b6fe6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 4 Aug 2011 16:56:42 +0200 Subject: [PATCH] basesrc: remove negotiation from the state change Remove the negotiation from the state change function, it causes data transfer and bufferpool negotiation, which is not supposed to be done. Since we have the reconfigure state on the pad, the create function will do the negotiation as soon as it gets in the streaming thread. --- libs/gst/base/gstbasesrc.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 45aea31..153aabf 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -2908,21 +2908,6 @@ gst_base_src_start (GstBaseSrc * basesrc) GST_DEBUG_OBJECT (basesrc, "is random_access: %d", basesrc->random_access); - /* run typefind if we are random_access and the typefinding is enabled. */ - if (basesrc->random_access && basesrc->typefind && size != -1) { - GstCaps *caps; - - if (!(caps = gst_type_find_helper (basesrc->srcpad, size))) - goto typefind_failed; - - result = gst_base_src_set_caps (basesrc, caps); - gst_caps_unref (caps); - } else { - /* use class or default negotiate function */ - if (!(result = gst_base_src_negotiate (basesrc))) - goto could_not_negotiate; - } - return result; /* ERROR */ @@ -2932,23 +2917,6 @@ could_not_start: /* subclass is supposed to post a message. We don't have to call _stop. */ return FALSE; } -could_not_negotiate: - { - GST_DEBUG_OBJECT (basesrc, "could not negotiate, stopping"); - GST_ELEMENT_ERROR (basesrc, STREAM, FORMAT, - ("Could not negotiate format"), ("Check your filtered caps, if any")); - /* we must call stop */ - gst_base_src_stop (basesrc); - return FALSE; - } -typefind_failed: - { - GST_DEBUG_OBJECT (basesrc, "could not typefind, stopping"); - GST_ELEMENT_ERROR (basesrc, STREAM, TYPE_NOT_FOUND, (NULL), (NULL)); - /* we must call stop */ - gst_base_src_stop (basesrc); - return FALSE; - } } static gboolean -- 2.7.4