From: Sebastian Dröge Date: Mon, 29 Apr 2013 10:48:13 +0000 (+0200) Subject: typefind: Only push pending buffers and events if we have caps X-Git-Tag: 1.1.1~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cf0566f9ca0a442efc9a84b1d1d7ddbd63930a25;p=platform%2Fupstream%2Fgstreamer.git typefind: Only push pending buffers and events if we have caps --- diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index 4e21240..3a89c3d 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -543,12 +543,13 @@ stop_typefinding (GstTypeFindElement * typefind) gst_element_get_state (GST_ELEMENT (typefind), &state, NULL, 0); - push_cached_buffers = (state >= GST_STATE_PAUSED); + GST_OBJECT_LOCK (typefind); + + push_cached_buffers = (state >= GST_STATE_PAUSED && typefind->caps); GST_DEBUG_OBJECT (typefind, "stopping typefinding%s", push_cached_buffers ? " and pushing cached buffers" : ""); - GST_OBJECT_LOCK (typefind); avail = gst_adapter_available (typefind->adapter); if (avail == 0) goto no_data;