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 /ffmpeg.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 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -707,11 +707,6 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename) choose_pixel_fmt(st, codec); } - if(!st->codec->thread_count) - st->codec->thread_count = 1; - if(st->codec->thread_count>1) - avcodec_thread_init(st->codec, st->codec->thread_count); - if(st->codec->flags & CODEC_FLAG_BITEXACT) nopts = 1; @@ -3248,7 +3243,7 @@ static void opt_input_file(const char *filename) for(i=0;i<ic->nb_streams;i++) { AVStream *st = ic->streams[i]; AVCodecContext *dec = st->codec; - avcodec_thread_init(dec, thread_count); + dec->thread_count = thread_count; input_codecs = grow_array(input_codecs, sizeof(*input_codecs), &nb_input_codecs, nb_input_codecs + 1); switch (dec->codec_type) { case AVMEDIA_TYPE_AUDIO: @@ -3406,7 +3401,7 @@ static void new_video_stream(AVFormatContext *oc, int file_idx) ost->bitstream_filters = video_bitstream_filters; video_bitstream_filters= NULL; - avcodec_thread_init(st->codec, thread_count); + st->codec->thread_count= thread_count; video_enc = st->codec; @@ -3553,7 +3548,7 @@ static void new_audio_stream(AVFormatContext *oc, int file_idx) ost->bitstream_filters = audio_bitstream_filters; audio_bitstream_filters= NULL; - avcodec_thread_init(st->codec, thread_count); + st->codec->thread_count= thread_count; audio_enc = st->codec; audio_enc->codec_type = AVMEDIA_TYPE_AUDIO; |