From dd154198b1afa9f3f740eb0b2ccd7ab665f8edd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Tue, 27 Nov 2012 21:58:22 +0100 Subject: [PATCH] Add assert that the avcodec lock is held when initializing static VLC tables. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Reimar Döffinger --- libavcodec/bitstream.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index ce83ee01f9..e986300be1 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -30,6 +30,7 @@ #include "libavutil/avassert.h" #include "avcodec.h" +#include "internal.h" #include "mathops.h" #include "get_bits.h" #include "put_bits.h" @@ -275,6 +276,7 @@ int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, }else if(vlc->table_size){ abort(); // fatal error, we are called on a partially initialized table } + av_assert0(ff_avcodec_locked); }else { vlc->table = NULL; vlc->table_allocated = 0; -- 2.11.0