encoderd: enhance robustness of open() with HANDLE_EINTR Macro (#34478)

HANDLE_EINTR
pull/34491/head
Dean Lee 3 months ago committed by GitHub
parent 1b1d37db65
commit e7b63dce65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      system/loggerd/encoder/v4l_encoder.cc

@ -155,7 +155,7 @@ void V4LEncoder::dequeue_handler(V4LEncoder *e) {
V4LEncoder::V4LEncoder(const EncoderInfo &encoder_info, int in_width, int in_height) V4LEncoder::V4LEncoder(const EncoderInfo &encoder_info, int in_width, int in_height)
: VideoEncoder(encoder_info, in_width, in_height) { : VideoEncoder(encoder_info, in_width, in_height) {
fd = open("/dev/v4l/by-path/platform-aa00000.qcom_vidc-video-index1", O_RDWR|O_NONBLOCK); fd = HANDLE_EINTR(open("/dev/v4l/by-path/platform-aa00000.qcom_vidc-video-index1", O_RDWR|O_NONBLOCK));
assert(fd >= 0); assert(fd >= 0);
struct v4l2_capability cap; struct v4l2_capability cap;

Loading…
Cancel
Save