[FFmpeg-devel] [PATCH] oma: fix build if memcmp() is a macro
Mans Rullgard
mans
Sat May 16 15:16:45 CEST 2009
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.
---
libavformat/oma.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/oma.c b/libavformat/oma.c
index e82eeac..ecfb242 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -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;
--
1.6.3.1
More information about the ffmpeg-devel
mailing list