Skip to content

Commit 64fb09b

Browse files
authored
Merge pull request #1 from daniel-fer33/df/Fix-MMAL-no-buffers-available
Fix MMAL no buffers available
2 parents 5f5255a + 2695db2 commit 64fb09b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

picamerax/mmalobj.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,11 @@ def wrapper(port, buf):
12981298
finally:
12991299
buf.release()
13001300
try:
1301-
self._pool.send_buffer(block=False)
1301+
# Only try to send buffer if the port type is output
1302+
# or else we will suffer a MMAL no buffers available
1303+
# error.
1304+
if self._port[0].type == mmal.MMAL_PORT_TYPE_OUTPUT:
1305+
self._pool.send_buffer(block=False)
13021306
except PiCameraPortDisabled:
13031307
# The port was disabled, no point trying again
13041308
pass

0 commit comments

Comments
 (0)