Andreas Rheinhardt
5a261cfa32
avformat/allformats: Fix data race when accessing devices lists
...
Up until now setting the input and output devices lists is guarded
by a mutex. This prevents data races emanating from multiple concurrent
calls to avpriv_register_devices() (triggered by multiple concurrent
calls to avdevice_register_all()). Yet reading the lists pointers was
done without any lock and with nonatomic variables. This means that
there are data races in case of concurrent calls to
av_(de)muxer_iterate() and avdevice_register_all() (but only if the
iteration in av_(de)muxer_iterate exhausts the non-device (de)muxers).
This commit fixes this by putting said pointers into atomic objects.
Due to the unavailability of _Atomic the object is an atomic_uintptr,
leading to ugly casts. Switching to atomics also allowed to remove
the mutex currently used in avpriv_register_devices().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-10-09 13:20:39 +02:00
..
2021-09-28 23:02:20 +03:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-10-09 13:20:39 +02:00
2021-10-03 11:42:15 +02:00
2021-10-03 20:56:12 +02:00
2021-09-17 13:22:25 +02:00
2021-09-26 08:51:41 +02:00
2021-09-30 14:02:27 +02:00
2021-09-17 13:22:25 +02:00
2021-10-03 20:50:50 +02:00
2021-09-23 17:37:22 +02:00
2021-09-17 13:22:25 +02:00
2021-10-03 20:50:50 +02:00
2021-10-07 23:38:57 +02:00
2021-10-03 20:56:12 +02:00
2021-10-04 17:13:21 +03:00
2021-10-04 17:13:21 +03:00
2021-09-17 13:22:25 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 13:22:25 +02:00
2021-09-27 07:08:58 +02:00
2021-09-27 06:05:46 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 04:58:34 +02:00
2021-09-22 18:53:53 +02:00
2021-09-17 13:22:25 +02:00
2021-09-23 10:35:09 -03:00
2021-09-19 20:12:32 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-26 08:51:58 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-27 06:06:08 +02:00
2021-10-07 22:06:27 +02:00
2021-10-03 20:56:12 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-10-07 14:06:58 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 13:22:25 +02:00
2021-10-03 20:50:50 +02:00
2021-09-20 01:03:52 +02:00
2021-09-17 04:58:34 +02:00
2021-09-20 01:03:52 +02:00
2021-09-17 13:22:25 +02:00
2021-09-29 18:00:14 +08:00
2021-09-27 07:08:59 +02:00
2021-09-17 13:22:25 +02:00
2021-10-08 20:37:36 +11:00
2021-10-08 20:37:36 +11:00
2021-10-03 20:56:12 +02:00
2021-10-03 20:56:05 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 13:22:25 +02:00
2021-10-04 17:55:27 +03:00
2021-10-04 17:55:27 +03:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-13 22:48:10 +02:00
2021-09-25 23:11:56 +02:00
2021-09-26 01:43:18 +02:00
2021-09-18 22:10:03 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-10-07 11:55:55 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 14:42:17 +02:00
2021-09-17 13:22:25 +02:00
2021-10-03 20:56:12 +02:00
2021-09-17 13:22:25 +02:00
2021-09-07 18:16:13 +02:00
2021-09-17 13:22:25 +02:00
2021-09-08 22:59:14 +02:00
2021-09-08 22:59:14 +02:00
2021-10-04 17:55:27 +03:00
2021-10-04 17:55:27 +03:00
2021-09-24 00:13:49 +02:00
2021-09-17 13:22:25 +02:00
2021-10-03 20:56:12 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-27 07:08:59 +02:00
2021-10-07 23:38:57 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-10-03 20:56:12 +02:00
2021-09-17 13:22:25 +02:00
2021-09-22 22:44:30 +02:00
2021-10-03 20:50:50 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-24 00:14:10 +02:00
2021-09-27 07:08:59 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 13:22:25 +02:00
2021-09-20 01:03:52 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 13:22:25 +02:00
2021-09-08 22:59:14 +02:00
2021-09-01 19:55:30 -03:00
2021-09-17 13:22:25 +02:00
2021-09-07 18:07:11 +10:00
2021-09-24 00:14:01 +02:00
2021-09-17 13:22:25 +02:00
2021-10-09 11:42:16 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-08 22:59:14 +02:00
2021-09-08 22:59:14 +02:00
2021-09-19 04:40:13 +02:00
2021-09-20 01:03:52 +02:00
2021-09-17 13:22:25 +02:00
2021-09-20 01:03:52 +02:00
2021-09-17 13:22:25 +02:00
2021-10-07 11:52:10 +02:00
2021-10-02 17:16:34 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:53:30 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 04:58:34 +02:00
2021-09-20 01:03:52 +02:00
2021-10-02 17:16:29 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-10-03 20:56:12 +02:00
2021-09-17 13:22:25 +02:00
2021-10-03 20:56:12 +02:00
2021-09-17 13:22:25 +02:00
2021-09-29 18:00:14 +08:00
2021-10-08 20:37:36 +11:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-10-09 11:42:16 +02:00
2021-09-20 01:03:52 +02:00
2021-09-17 04:58:34 +02:00
2021-10-03 20:56:12 +02:00
2021-09-17 13:22:25 +02:00
2021-09-20 01:03:52 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 13:22:25 +02:00
2021-09-17 04:58:34 +02:00
2021-09-17 04:58:34 +02:00