mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
v4l2allocator: Don't do REQBUFS(0) on inactive allocator
If the allocator is no longer active, it means the memory has already been freed, calling REQBUF(0) would make no sense. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/649>
This commit is contained in:
parent
b8f1f2195e
commit
93b202b84e
1 changed files with 3 additions and 0 deletions
|
@ -812,6 +812,9 @@ gst_v4l2_allocator_orphan (GstV4l2Allocator * allocator)
|
|||
|
||||
GST_OBJECT_FLAG_SET (allocator, GST_V4L2_ALLOCATOR_FLAG_ORPHANED);
|
||||
|
||||
if (!g_atomic_int_get (&allocator->active))
|
||||
return TRUE;
|
||||
|
||||
if (obj->ioctl (obj->video_fd, VIDIOC_REQBUFS, &breq) < 0) {
|
||||
GST_ERROR_OBJECT (allocator,
|
||||
"error orphaning buffers buffers: %s", g_strerror (errno));
|
||||
|
|
Loading…
Reference in a new issue