1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-04-08 16:54:03 +02:00
FFmpeg/libavformat
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-04-27 11:48:06 -03:00
2021-06-10 16:51:44 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-07-22 15:02:30 +02:00
2021-03-31 22:01:36 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-02-02 23:53:29 +01:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-07-31 22:08:19 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-09-19 20:12:32 +02:00
2021-04-27 11:48:06 -03:00
2021-09-26 08:51:58 +02:00
2021-04-27 11:48:06 -03:00
2021-10-03 20:56:12 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-07-08 16:03:17 +02:00
2021-04-27 11:48:06 -03:00
2021-07-22 15:02:30 +02:00
2021-07-20 11:20:04 +05:30
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-08-06 22:49:26 +02:00
2021-07-22 15:02:30 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2020-12-21 01:27:33 -05:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-10-03 20:56:12 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-06-18 18:58:25 +02:00
2021-09-07 18:07:11 +10:00
2021-09-24 00:14:01 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-09-19 04:40:13 +02:00
2021-07-05 12:49:55 -04:00
2021-10-07 11:52:10 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-10-03 20:56:12 +02:00
2021-04-27 11:48:06 -03:00
2021-10-03 20:56:12 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-07-08 16:03:18 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-10-09 11:42:16 +02:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00
2021-04-27 11:48:06 -03:00