libhwc: Ensure buffer type is a v4l2_buf_type
authorChristopher N. Hesse <raymanfx@gmail.com>
Sat, 26 Nov 2016 18:24:39 +0000 (19:24 +0100)
committerChristopher N. Hesse <raymanfx@gmail.com>
Sat, 3 Dec 2016 12:31:04 +0000 (04:31 -0800)
Change-Id: I31065ec7bff46af1ce080d5d386616f5cc3964f8

libhwc/hwc.cpp

index b4e4a8eef1f43561b4e702723b5aa166340180dc..ccd6cf87ac7795b7a347964c546a20288dea03d2 100644 (file)
@@ -731,7 +731,8 @@ static int hdmi_output(struct exynos5_hwc_composer_device_1_t *dev,
     hl.current_buf = (hl.current_buf + 1) % NUM_HDMI_BUFFERS;
 
     if (!hl.streaming) {
-        if (exynos_v4l2_streamon(hl.fd, buffer.type) < 0) {
+        enum v4l2_buf_type buffer_type = static_cast<v4l2_buf_type>(buffer.type);
+        if (exynos_v4l2_streamon(hl.fd, buffer_type) < 0) {
             ALOGE("%s: layer%d: streamon failed %d", __func__, hl.id, errno);
             ret = -1;
             goto err;