From 922815996f166f42a1ff148a5ef2561c97a5d973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 29 Apr 2013 12:39:20 +0200 Subject: [PATCH] typefind: Remove code that would cause caps to be sent twice Whenever we set typefind->caps we will also send a caps event downstream. --- plugins/elements/gsttypefindelement.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index f333fb426a..4e21240673 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -700,7 +700,7 @@ gst_type_find_element_setcaps (GstTypeFindElement * typefind, GstCaps * caps) gsize avail; GST_DEBUG_OBJECT (typefind, "Skipping typefinding, using caps from " - "upstream buffer: %" GST_PTR_FORMAT, caps); + "upstream: %" GST_PTR_FORMAT, caps); typefind->mode = MODE_NORMAL; gst_type_find_element_send_cached_events (typefind); @@ -966,14 +966,6 @@ gst_type_find_element_activate_src_mode (GstPad * pad, GstObject * parent, * activation might happen from the streaming thread. */ gst_pad_pause_task (typefind->sink); res = gst_pad_activate_mode (typefind->sink, mode, active); - if (active && res && typefind->caps) { - GstCaps *caps; - GST_OBJECT_LOCK (typefind); - caps = gst_caps_ref (typefind->caps); - GST_OBJECT_UNLOCK (typefind); - res = gst_pad_set_caps (typefind->src, caps); - gst_caps_unref (caps); - } break; default: res = TRUE;