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.
This commit is contained in:
Tim-Philipp Müller 2012-07-17 19:20:23 +01:00
parent 8c864712e6
commit 39054884fd

View file

@ -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;