aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorAlexander Strange <astrange@ithinksw.com>2011-02-07 21:15:45 -0500
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-09 09:17:28 -0500
commitc0b102ca03fe92250f1ce620aec3836f529fc1d6 (patch)
tree1087a645990e02587a8c92c7d4298c25b3c4f55b /libavcodec/pthread.c
parent8e8cc52be3b515bc91cd9452daca7a65feaea5ad (diff)
downloadffmpeg-c0b102ca03fe92250f1ce620aec3836f529fc1d6.tar.gz
Deprecate avcodec_thread_init()
As a side effect of the last commit, avcodec_open() now calls it automatically, so there is no longer any need for clients to call it. Instead they should set AVCodecContext.thread_count. avcodec_thread_free() is deprecated, and will be removed from avcodec.h at the next MAJOR libavcodec bump. Rename the functions to ff_thread_init/free, since they are now internal. Wrappers are provided to maintain API compatibility. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 00e419bf0c..0e033d37c0 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -256,7 +256,7 @@ static int thread_init(AVCodecContext *avctx)
if(pthread_create(&c->workers[i], NULL, worker, avctx)) {
avctx->thread_count = i;
pthread_mutex_unlock(&c->current_job_lock);
- avcodec_thread_free(avctx);
+ ff_thread_free(avctx);
return -1;
}
}
@@ -870,7 +870,7 @@ static void validate_thread_parameters(AVCodecContext *avctx)
}
}
-int avcodec_thread_init(AVCodecContext *avctx, int thread_count)
+int ff_thread_init(AVCodecContext *avctx, int thread_count)
{
if (avctx->thread_opaque) {
av_log(avctx, AV_LOG_ERROR, "avcodec_thread_init is ignored after avcodec_open\n");
@@ -891,7 +891,7 @@ int avcodec_thread_init(AVCodecContext *avctx, int thread_count)
return 0;
}
-void avcodec_thread_free(AVCodecContext *avctx)
+void ff_thread_free(AVCodecContext *avctx)
{
if (avctx->active_thread_type&FF_THREAD_FRAME)
frame_thread_free(avctx, avctx->thread_count);