Commit eb607621 authored by Jerome Wu's avatar Jerome Wu

Add init_variables to be able to run main multiple times

parent 1bc6c17f
......@@ -4816,11 +4816,24 @@ static void log_callback_null(void *ptr, int level, const char *fmt, va_list vl)
{
}
/*
* ffmpeg.wasm: initialize variables for a new run
*/
static void init_variables() {
nb_input_streams = 0;
nb_input_files = 0;
nb_output_streams = 0;
nb_output_files = 0;
nb_filtergraphs = 0;
ffmpeg_exited = 0;
}
int main(int argc, char **argv)
{
int i, ret;
BenchmarkTimeStamps ti;
init_variables();
init_dynload();
register_exit(ffmpeg_cleanup);
......
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