diff options
author | Alexander Strange <astrange@ithinksw.com> | 2011-02-07 21:15:45 -0500 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-09 09:17:28 -0500 |
commit | c0b102ca03fe92250f1ce620aec3836f529fc1d6 (patch) | |
tree | 1087a645990e02587a8c92c7d4298c25b3c4f55b /libavcodec/w32thread.c | |
parent | 8e8cc52be3b515bc91cd9452daca7a65feaea5ad (diff) | |
download | ffmpeg-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/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; } |