From 0fda329bbb8de423ce81a995d48413f60c852990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 29 Apr 2013 12:52:46 +0200 Subject: [PATCH] typefind: Improve handling of GAP events There's still room for improvement though. --- plugins/elements/gsttypefindelement.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index 932ddfeaed..31e41272ef 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -623,6 +623,19 @@ gst_type_find_element_sink_event (GstPad * pad, GstObject * parent, gst_event_unref (event); break; } + case GST_EVENT_GAP: + { + GST_FIXME_OBJECT (typefind, + "GAP events during typefinding not handled properly"); + + /* FIXME: These would need to be inserted in the stream at + * the right position between buffers, but we combine all + * buffers with a GstAdapter. Drop the GAP event for now, + * which will only cause an implicit GAP between buffers. + */ + gst_event_unref (event); + res = TRUE; + } case GST_EVENT_EOS: { GST_INFO_OBJECT (typefind, "Got EOS and no type found yet");