Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-05-22 13:00:23 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-05-22 13:36:32 +0300
commit9fb293cfd8b758b98f1f535a2867c7bf3a324af6 (patch)
tree5ae8bd17dbccd90cdfbdeeabf893d92e1369d077 /libavformat
parent49d0678181af67455dfd23b98ab3857db1b68e67 (diff)
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
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/allformats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 62661d14a4..b3ffe0f2b6 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -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);
}