mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
v4l2allocator: Add debug assert to detect calls in the wrong state
This commit is contained in:
parent
1f70b21926
commit
2cb6b9775c
1 changed files with 4 additions and 0 deletions
|
@ -1221,6 +1221,8 @@ gst_v4l2_allocator_qbuf (GstV4l2Allocator * allocator,
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
|
g_return_val_if_fail (g_atomic_int_get (&allocator->active), FALSE);
|
||||||
|
|
||||||
/* Buffer already queued */
|
/* Buffer already queued */
|
||||||
if (IS_QUEUED (group->buffer))
|
if (IS_QUEUED (group->buffer))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1272,6 +1274,8 @@ gst_v4l2_allocator_dqbuf (GstV4l2Allocator * allocator)
|
||||||
|
|
||||||
GstV4l2MemoryGroup *group = NULL;
|
GstV4l2MemoryGroup *group = NULL;
|
||||||
|
|
||||||
|
g_return_val_if_fail (g_atomic_int_get (&allocator->active), FALSE);
|
||||||
|
|
||||||
buffer.type = allocator->type;
|
buffer.type = allocator->type;
|
||||||
buffer.memory = allocator->memory;
|
buffer.memory = allocator->memory;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue