changeset 4943:6fd474401f0c libavformat

oma: fix build if memcmp() is a macro Any C library function may be a macro, so compound literals passed to memcmp() must be surrounded by parens to avoid being split on commas.
author mru
date Sat, 16 May 2009 15:09:30 +0000
parents 02e9151a011e
children 4c1e9b3799a4
files oma.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/oma.c	Sat May 16 04:08:34 2009 +0000
+++ b/oma.c	Sat May 16 15:09:30 2009 +0000
@@ -89,7 +89,7 @@
     if (ret != EA3_HEADER_SIZE)
         return -1;
 
-    if (memcmp(buf, (const uint8_t[]){'E', 'A', '3'},3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) {
+    if (memcmp(buf, ((const uint8_t[]){'E', 'A', '3'}),3) || buf[4] != 0 || buf[5] != EA3_HEADER_SIZE) {
         av_log(s, AV_LOG_ERROR, "Couldn't find the EA3 header !\n");
         return -1;
     }
@@ -177,7 +177,7 @@
 
 static int oma_read_probe(AVProbeData *p)
 {
-    if (!memcmp(p->buf, (const uint8_t[]){'e', 'a', '3', 3, 0},5))
+    if (!memcmp(p->buf, ((const uint8_t[]){'e', 'a', '3', 3, 0}),5))
         return AVPROBE_SCORE_MAX;
     else
         return 0;