]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
oma: fix build if memcmp() is a macro
authormru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 16 May 2009 15:09:30 +0000 (15:09 +0000)
committermru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 16 May 2009 15:09:30 +0000 (15:09 +0000)
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.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18856 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/oma.c

index e82eeaca43dd687920a9633407c52f4302719a95..ecfb24222c146a67302c15e36469c5f81b274ba8 100644 (file)
@@ -89,7 +89,7 @@ static int oma_read_header(AVFormatContext *s,
     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_packet(AVFormatContext *s, AVPacket *pkt)
 
 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;