diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-05-22 12:00:23 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2017-05-22 12:36:32 +0200 |
commit | 9fb293cfd8b758b98f1f535a2867c7bf3a324af6 (patch) | |
tree | 5ae8bd17dbccd90cdfbdeeabf893d92e1369d077 /libavdevice | |
parent | 49d0678181af67455dfd23b98ab3857db1b68e67 (diff) | |
download | ffmpeg-9fb293cfd8b758b98f1f535a2867c7bf3a324af6.tar.gz |
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 'libavdevice')
-rw-r--r-- | libavdevice/alldevices.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 280a260bd3..a8ed53ae5d 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -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); } |