mirror of https://github.com/mpv-player/mpv
ao_coreaudio: fix inverted condition
And also use the correct type for the printf call below.
This commit is contained in:
parent
46eb04f3c2
commit
77869e5914
|
@ -141,16 +141,17 @@ char *fourcc_repr(void *talloc_ctx, uint32_t code)
|
||||||
};
|
};
|
||||||
|
|
||||||
bool valid_fourcc = true;
|
bool valid_fourcc = true;
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++) {
|
||||||
if (fcc[i] >= 32 && fcc[i] < 128)
|
if (fcc[i] < 32 || fcc[i] >= 128)
|
||||||
valid_fourcc = false;
|
valid_fourcc = false;
|
||||||
|
}
|
||||||
|
|
||||||
char *repr;
|
char *repr;
|
||||||
if (valid_fourcc)
|
if (valid_fourcc)
|
||||||
repr = talloc_asprintf(talloc_ctx, "'%c%c%c%c'",
|
repr = talloc_asprintf(talloc_ctx, "'%c%c%c%c'",
|
||||||
fcc[0], fcc[1], fcc[2], fcc[3]);
|
fcc[0], fcc[1], fcc[2], fcc[3]);
|
||||||
else
|
else
|
||||||
repr = talloc_asprintf(NULL, "%d", code);
|
repr = talloc_asprintf(NULL, "%u", (unsigned int)code);
|
||||||
|
|
||||||
return repr;
|
return repr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue