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/w32thread.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/w32thread.c')
-rw-r--r-- | libavcodec/w32thread.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/w32thread.c b/libavcodec/w32thread.c index 007508e409..1659fd3031 100644 --- a/libavcodec/w32thread.c +++ b/libavcodec/w32thread.c @@ -69,10 +69,10 @@ static unsigned WINAPI attribute_align_arg thread_func(void *v){ } /** - * Free what has been allocated by avcodec_thread_init(). + * Free what has been allocated by ff_thread_init(). * Must be called after decoding has finished, especially do not call while avcodec_thread_execute() is running. */ -void avcodec_thread_free(AVCodecContext *s){ +void ff_thread_free(AVCodecContext *s){ ThreadContext *c= s->thread_opaque; int i; @@ -124,7 +124,7 @@ static int avcodec_thread_execute2(AVCodecContext *s, int (*func)(AVCodecContext avcodec_thread_execute(s, NULL, arg, ret, count, 0); } -int avcodec_thread_init(AVCodecContext *s, int thread_count){ +int ff_thread_init(AVCodecContext *s, int thread_count){ int i; ThreadContext *c; uint32_t threadid; @@ -169,6 +169,6 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count){ return 0; fail: - avcodec_thread_free(s); + ff_thread_free(s); return -1; } |