summaryrefslogtreecommitdiffstats
path: root/libavcodec/bitstream.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-11-27 21:58:22 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-12-05 21:01:17 +0100
commitdd154198b1afa9f3f740eb0b2ccd7ab665f8edd4 (patch)
treeffa993c17dec5511183542f852344b572a5559d1 /libavcodec/bitstream.c
parent7feef7dbca5f6a816e04b63c17aad5dacd272f6e (diff)
downloadffmpeg-streaming-dd154198b1afa9f3f740eb0b2ccd7ab665f8edd4.zip
ffmpeg-streaming-dd154198b1afa9f3f740eb0b2ccd7ab665f8edd4.tar.gz
Add assert that the avcodec lock is held when initializing static VLC tables.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/bitstream.c')
-rw-r--r--libavcodec/bitstream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index ce83ee0..e986300 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;
OpenPOWER on IntegriCloud