videoaggregator: fix crash when receiving buffer without timestamps

Unset out buffer in clip function when we unref the buffer to be
clipped, otherwise aggregator will continue to use the already-
freed buffer. Fixes crash when buffers without timestamps are
being fed to aggregator. Partly because aggregator ignores the
error flow return.

https://bugzilla.gnome.org/show_bug.cgi?id=743334
This commit is contained in:
Tim-Philipp Müller 2015-01-26 09:22:23 +00:00
parent 6b2f694455
commit 38a06d0a33

View file

@ -1512,8 +1512,9 @@ gst_videoaggregator_sink_clip (GstAggregator * agg,
start_time = GST_BUFFER_TIMESTAMP (buf);
if (start_time == -1) {
GST_DEBUG_OBJECT (pad, "Timestamped buffers required!");
GST_WARNING_OBJECT (pad, "Timestamped buffers required!");
gst_buffer_unref (buf);
*outbuf = NULL;
return GST_FLOW_ERROR;
}