diff options
author | Alexander Strange <astrange@ithinksw.com> | 2011-02-07 21:15:45 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-11 02:54:08 +0100 |
commit | 043d2ff2673933c0ac8995b74c76973bd93cdd3e (patch) | |
tree | b81de1d2b67ba97112447a3f7c0a67e46d24d5c8 /libavcodec/pthread.c | |
parent | 03e3cb8777b64afba9318ea1fbd085e133d16af6 (diff) | |
download | ffmpeg-043d2ff2673933c0ac8995b74c76973bd93cdd3e.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>
(cherry picked from commit c0b102ca03fe92250f1ce620aec3836f529fc1d6)
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r-- | libavcodec/pthread.c | 6 |
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); |