From a1b923c78aacde8dc60746a9d9adf81164fcfd82 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 22 Sep 2016 11:28:21 -0400 Subject: [PATCH] nlecomposition: Don't try to seek on an empty stack We would seek on a NULL pad then, which gives ugly assertions. https://bugzilla.gnome.org/show_bug.cgi?id=771843 --- plugins/nle/nlecomposition.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/nle/nlecomposition.c b/plugins/nle/nlecomposition.c index cc138ca..91508d1 100644 --- a/plugins/nle/nlecomposition.c +++ b/plugins/nle/nlecomposition.c @@ -1491,6 +1491,13 @@ _seek_current_stack (NleComposition * comp, GstEvent * event, GST_INFO_OBJECT (comp, "Seeking itself %" GST_PTR_FORMAT, event); + if (!peer) { + GST_ERROR_OBJECT (comp, "Can't seek because no pad available - " + "no children in the composition ready to be used, the duration is 0, " + "or not committed yet"); + return FALSE; + } + if (flush_downstream) { priv->flush_seqnum = gst_event_get_seqnum (event); GST_INFO_OBJECT (comp, "sending flushes downstream with seqnum %d", -- 2.7.4