vaapi-recorder: Don't loop trying to write on out of space condition
The error handling for the function that writes the encoded frame on
the disk was bogus, always assuming the buffer supplied to the encoder
was too small. That would cause a bigger buffer to be allocated and
another attempt to encode the frame was done. In the case of a failure
to write to disk (due to ENOSPC, for instance) that would cause an
endless loop.
Possibly-related-to: https://bugs.freedesktop.org/show_bug.cgi?id=69330
diff --git a/src/vaapi-recorder.h b/src/vaapi-recorder.h
index 664b1f9..e304698 100644
--- a/src/vaapi-recorder.h
+++ b/src/vaapi-recorder.h
@@ -29,7 +29,7 @@
vaapi_recorder_create(int drm_fd, int width, int height, const char *filename);
void
vaapi_recorder_destroy(struct vaapi_recorder *r);
-void
+int
vaapi_recorder_frame(struct vaapi_recorder *r, int fd, int stride);
#endif /* _VAAPI_RECORDER_H_ */