Add error handling when running out of free frame buffers. Change-Id: If28b59b9521204a6e3aecedcf75932d76a752567