From 10396f12d43ed7d7b10aae556ba1b2a2ec4e6cba Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Mon, 14 May 2012 03:57:50 +0200 Subject: [PATCH] typefindelement: if sink pad is activated do not change mode In commit bf0964b6 a check for pad is activated was not carried. This leads to attempt to pull while in push mode when force_caps is set. In this case without the attached check even when activated in pull mode we activate back to push mode. This is from comment in previous code , case number eight: 8. if the sink pad is activated, we are in pull mode. succeed. - otherwise activate both pads in push mode and succeed. Putting it back fixes playback of webm in webkit+gstreamer 1.0 . Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676003 --- plugins/elements/gsttypefindelement.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index 436a4e9..e6c4de2 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -1190,6 +1190,12 @@ gst_type_find_element_activate_sink (GstPad * pad, GstObject * parent) g_signal_emit (typefind, gst_type_find_element_signals[HAVE_TYPE], 0, probability, found_caps); typefind->mode = MODE_NORMAL; + /* the signal above could have made a downstream element activate + * the pad in pull mode, we check if the pad is already active now and if + * so, we are done */ + if (gst_pad_is_active (pad)) + return TRUE; + goto typefind_push; } GST_OBJECT_UNLOCK (typefind); -- 2.7.4