diff options
author | Vivekanand <sendtovivekanand@gmail.com> | 2016-04-07 16:16:23 +0530 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-15 18:54:34 +0200 |
commit | 5af0ada4427140fc7d7abbd175ecad91433d155d (patch) | |
tree | c5e841656f976b43a29541ee949a2fa5400d8db3 /ffmpeg.c | |
parent | ffb503c9a14c837d6f73a609129c4fca4836b51d (diff) | |
download | ffmpeg-5af0ada4427140fc7d7abbd175ecad91433d155d.tar.gz |
avformat/allformats: Making av_register_all() thread-safe.
When multiple threads tries to call av_register_all(), the first thread sets
initialized to 1 and do the register process. At the same time, other thread might
also call av_register_all(), which returns immediately because initialized is set to 1
(even when it has not completed registering codecs). We can avoid this problem
if we set initialised to 1 while exiting from function.
Github: Closes #196
(cherry picked from commit b092ee701f4d0ef2b8a4171cd38101d1ee9a1034)
Conflicts:
libavformat/allformats.c
Diffstat (limited to 'ffmpeg.c')
0 files changed, 0 insertions, 0 deletions