mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fix compilation for VS.
- VS2013 does not support variable length arrays.
This commit is contained in:
parent
eec1bd18b7
commit
443f2f00aa
|
@ -273,7 +273,12 @@ int main(int argc, char *argv[])
|
|||
|
||||
//Now, do the real stuff
|
||||
{
|
||||
encoder_state encoder_states[encoder.owf + 1];
|
||||
encoder_state *encoder_states = malloc((encoder.owf + 1) * sizeof(encoder_state));
|
||||
if (encoder_states == NULL) {
|
||||
fprintf(stderr, "Failed to allocate memory.");
|
||||
goto exit_failure;
|
||||
}
|
||||
|
||||
int i;
|
||||
int current_encoder_state = 0;
|
||||
for (i = 0; i <= encoder.owf; ++i) {
|
||||
|
@ -406,6 +411,8 @@ int main(int argc, char *argv[])
|
|||
for (i = 0; i <= encoder.owf; ++i) {
|
||||
encoder_state_finalize(&encoder_states[i]);
|
||||
}
|
||||
|
||||
free(encoder_states);
|
||||
}
|
||||
|
||||
// Deallocating
|
||||
|
|
Loading…
Reference in a new issue