goto eos;
}
+ if (GST_VIDEO_INFO_FORMAT (&pool->caps_info) !=
+ GST_VIDEO_FORMAT_ENCODED && size < pool->size)
+ goto buffer_truncated;
+
num_queued = g_atomic_int_get (&pool->num_queued);
GST_TRACE_OBJECT (pool, "Only %i buffer left in the capture queue.",
num_queued);
*buf = NULL;
return GST_V4L2_FLOW_CORRUPTED_BUFFER;
}
+buffer_truncated:
+ {
+ GST_WARNING_OBJECT (pool,
+ "Dropping truncated buffer, this is likely a driver bug.");
+ gst_buffer_unref (*buf);
+ *buf = NULL;
+ return GST_V4L2_FLOW_CORRUPTED_BUFFER;
+ }
eos:
{
GST_DEBUG_OBJECT (pool, "end of stream reached");