commit 167ac4ccfd32d8df667c950d20a0b6eeea07d099
parent c5797c2963d3d3ab39e67f4b3508cec95ac6c501
Author: Heikki Lindholm <holin@iki.fi>
Date: Fri, 20 Jun 2008 18:43:24 +0000
remove thread-safety alert
Diffstat:
1 file changed, 0 insertions(+), 17 deletions(-)
diff --git a/src/plugins/thumbnailffmpeg/ffmpeg/libavcodec/utils.c b/src/plugins/thumbnailffmpeg/ffmpeg/libavcodec/utils.c
@@ -57,8 +57,6 @@ const uint8_t ff_reverse[256]={
0x0F,0x8F,0x4F,0xCF,0x2F,0xAF,0x6F,0xEF,0x1F,0x9F,0x5F,0xDF,0x3F,0xBF,0x7F,0xFF,
};
-static int volatile entangled_thread_counter=0;
-
void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
{
if(min_size < *size)
@@ -793,12 +791,6 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
{
int ret= -1;
- entangled_thread_counter++;
- if(entangled_thread_counter != 1){
- av_log(avctx, AV_LOG_ERROR, "insufficient thread locking around avcodec_open/close()\n");
- goto end;
- }
-
if(avctx->codec || !codec)
goto end;
@@ -836,7 +828,6 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
}
ret=0;
end:
- entangled_thread_counter--;
return ret;
}
@@ -959,13 +950,6 @@ int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub,
int avcodec_close(AVCodecContext *avctx)
{
- entangled_thread_counter++;
- if(entangled_thread_counter != 1){
- av_log(avctx, AV_LOG_ERROR, "insufficient thread locking around avcodec_open/close()\n");
- entangled_thread_counter--;
- return -1;
- }
-
if (ENABLE_THREADS && avctx->thread_opaque)
avcodec_thread_free(avctx);
if (avctx->codec->close)
@@ -973,7 +957,6 @@ int avcodec_close(AVCodecContext *avctx)
avcodec_default_free_buffers(avctx);
av_freep(&avctx->priv_data);
avctx->codec = NULL;
- entangled_thread_counter--;
return 0;
}