Bläddra i källkod

v4l2-linux: Fix fourcc order

v4l2 pixfmt fourcc's are always stored little-endian.
ref: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/vidioc-enum-fmt.html?highlight=vidioc_enum_fmt
Kurt Kartaltepe 5 år sedan
förälder
incheckning
be7dcb8bf6
1 ändrade filer med 5 tillägg och 5 borttagningar
  1. 5 5
      plugins/linux-v4l2/v4l2-input.c

+ 5 - 5
plugins/linux-v4l2/v4l2-input.c

@@ -53,11 +53,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #define timeval2ns(tv) \
 	(((uint64_t)tv.tv_sec * 1000000000) + ((uint64_t)tv.tv_usec * 1000))
 
-#define V4L2_FOURCC_STR(code)                                                 \
-	(char[5])                                                             \
-	{                                                                     \
-		(code >> 24) & 0xFF, (code >> 16) & 0xFF, (code >> 8) & 0xFF, \
-			code & 0xFF, 0                                        \
+#define V4L2_FOURCC_STR(code)                                         \
+	(char[5])                                                     \
+	{                                                             \
+		code & 0xFF, (code >> 8) & 0xFF, (code >> 16) & 0xFF, \
+			(code >> 24) & 0xFF, 0                        \
 	}
 
 #define blog(level, msg, ...) blog(level, "v4l2-input: " msg, ##__VA_ARGS__)