From 39054884fd8765bf105dc376cbd3f798bd8f9602 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 17 Jul 2012 19:20:23 +0100 Subject: [PATCH] queue2: handle CAPS event and drop it if operating in ring buffer mode Fixes "Unexpected event of kind caps can't be added in temp file" warning when doing download buffering. --- plugins/elements/gstqueue2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c index 581ec55..206285f 100644 --- a/plugins/elements/gstqueue2.c +++ b/plugins/elements/gstqueue2.c @@ -1923,6 +1923,19 @@ gst_queue2_locked_enqueue (GstQueue2 * queue, gpointer item, item = NULL; } break; + case GST_EVENT_CAPS:{ + GstCaps *caps; + + gst_event_parse_caps (event, &caps); + GST_INFO ("got caps: %" GST_PTR_FORMAT, caps); + + if (!QUEUE_IS_USING_QUEUE (queue)) { + GST_LOG ("Dropping caps event, not using queue"); + gst_event_unref (event); + item = NULL; + } + break; + } default: if (!QUEUE_IS_USING_QUEUE (queue)) goto unexpected_event; -- 2.7.4