Revision 043d2ff2 ffmpeg.c
ffmpeg.c | ||
---|---|---|
707 | 707 |
choose_pixel_fmt(st, codec); |
708 | 708 |
} |
709 | 709 |
|
710 |
if(!st->codec->thread_count) |
|
711 |
st->codec->thread_count = 1; |
|
712 |
if(st->codec->thread_count>1) |
|
713 |
avcodec_thread_init(st->codec, st->codec->thread_count); |
|
714 |
|
|
715 | 710 |
if(st->codec->flags & CODEC_FLAG_BITEXACT) |
716 | 711 |
nopts = 1; |
717 | 712 |
|
... | ... | |
3248 | 3243 |
for(i=0;i<ic->nb_streams;i++) { |
3249 | 3244 |
AVStream *st = ic->streams[i]; |
3250 | 3245 |
AVCodecContext *dec = st->codec; |
3251 |
avcodec_thread_init(dec, thread_count);
|
|
3246 |
dec->thread_count = thread_count;
|
|
3252 | 3247 |
input_codecs = grow_array(input_codecs, sizeof(*input_codecs), &nb_input_codecs, nb_input_codecs + 1); |
3253 | 3248 |
switch (dec->codec_type) { |
3254 | 3249 |
case AVMEDIA_TYPE_AUDIO: |
... | ... | |
3406 | 3401 |
ost->bitstream_filters = video_bitstream_filters; |
3407 | 3402 |
video_bitstream_filters= NULL; |
3408 | 3403 |
|
3409 |
avcodec_thread_init(st->codec, thread_count);
|
|
3404 |
st->codec->thread_count= thread_count;
|
|
3410 | 3405 |
|
3411 | 3406 |
video_enc = st->codec; |
3412 | 3407 |
|
... | ... | |
3553 | 3548 |
ost->bitstream_filters = audio_bitstream_filters; |
3554 | 3549 |
audio_bitstream_filters= NULL; |
3555 | 3550 |
|
3556 |
avcodec_thread_init(st->codec, thread_count);
|
|
3551 |
st->codec->thread_count= thread_count;
|
|
3557 | 3552 |
|
3558 | 3553 |
audio_enc = st->codec; |
3559 | 3554 |
audio_enc->codec_type = AVMEDIA_TYPE_AUDIO; |
Also available in: Unified diff