Commit 78ad664a authored by Måns Rullgård's avatar Måns Rullgård

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.

Originally committed as revision 18856 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 7d485f16
...@@ -89,7 +89,7 @@ static int oma_read_header(AVFormatContext *s, ...@@ -89,7 +89,7 @@ static int oma_read_header(AVFormatContext *s,
if (ret != EA3_HEADER_SIZE) if (ret != EA3_HEADER_SIZE)
return -1; 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"); av_log(s, AV_LOG_ERROR, "Couldn't find the EA3 header !\n");
return -1; return -1;
} }
...@@ -177,7 +177,7 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -177,7 +177,7 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
static int oma_read_probe(AVProbeData *p) 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; return AVPROBE_SCORE_MAX;
else else
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment