Commit 9fb293cf authored by Hendrik Leppkes's avatar Hendrik Leppkes

Use AVOnce as a static variable consistently

Using AVOnce as a stack variable makes no sense as the state is lost
when the function exits.

This fixes repeated calls to av(filter/device)_register_all
parent 49d06781
......@@ -73,7 +73,7 @@ static void register_all(void)
void avdevice_register_all(void)
{
AVOnce control = AV_ONCE_INIT;
static AVOnce control = AV_ONCE_INIT;
ff_thread_once(&control, register_all);
}
......@@ -390,7 +390,7 @@ static void register_all(void)
void avfilter_register_all(void)
{
AVOnce control = AV_ONCE_INIT;
static AVOnce control = AV_ONCE_INIT;
ff_thread_once(&control, register_all);
}
......@@ -385,7 +385,7 @@ static void register_all(void)
void av_register_all(void)
{
AVOnce control = AV_ONCE_INIT;
static AVOnce control = AV_ONCE_INIT;
ff_thread_once(&control, register_all);
}
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