From b3cee7155a664708df20367ef34b25faa1b95acc Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Sun, 10 Jun 2012 12:48:00 -0400 Subject: [PATCH] typefindelement: Only send caps when pad is being activated Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677819 --- plugins/elements/gsttypefindelement.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index 2bc5699..74d2ede 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -460,7 +460,7 @@ gst_type_find_element_seek (GstTypeFindElement * typefind, GstEvent * event) gst_segment_do_seek (&seeksegment, rate, format, flags, cur_type, cur, stop_type, stop, NULL); - flush = ! !(flags & GST_SEEK_FLAG_FLUSH); + flush = !!(flags & GST_SEEK_FLAG_FLUSH); GST_DEBUG_OBJECT (typefind, "New segment %" GST_SEGMENT_FORMAT, &seeksegment); @@ -979,7 +979,7 @@ 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 (res && typefind->caps) { + if (active && res && typefind->caps) { GstCaps *caps; GST_OBJECT_LOCK (typefind); caps = gst_caps_ref (typefind->caps); -- 2.7.4