From 36d27047dda266fedc1cd859f05251ed016e82dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rblom?= Date: Wed, 17 Jul 2013 17:31:33 +0200 Subject: [PATCH] transcoding: avoid resetting thread_count to default value (zero). --- src/plumbing/transcoding.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plumbing/transcoding.c b/src/plumbing/transcoding.c index 5e97688c..53906469 100644 --- a/src/plumbing/transcoding.c +++ b/src/plumbing/transcoding.c @@ -948,12 +948,12 @@ transcoder_init_audio(transcoder_t *t, streaming_start_component_t *ssc) as->aud_ictx->codec_type = AVMEDIA_TYPE_AUDIO; as->aud_octx->codec_type = AVMEDIA_TYPE_AUDIO; - as->aud_ictx->thread_count = sysconf(_SC_NPROCESSORS_ONLN); - as->aud_octx->thread_count = sysconf(_SC_NPROCESSORS_ONLN); - avcodec_get_context_defaults3(as->aud_ictx, icodec); avcodec_get_context_defaults3(as->aud_octx, ocodec); + as->aud_ictx->thread_count = sysconf(_SC_NPROCESSORS_ONLN); + as->aud_octx->thread_count = sysconf(_SC_NPROCESSORS_ONLN); + as->aud_ictx->codec_type = AVMEDIA_TYPE_AUDIO; as->aud_octx->codec_type = AVMEDIA_TYPE_AUDIO; @@ -1055,12 +1055,12 @@ transcoder_init_video(transcoder_t *t, streaming_start_component_t *ssc) vs->vid_ictx = avcodec_alloc_context(); vs->vid_octx = avcodec_alloc_context(); - vs->vid_ictx->thread_count = sysconf(_SC_NPROCESSORS_ONLN); - vs->vid_octx->thread_count = sysconf(_SC_NPROCESSORS_ONLN); - avcodec_get_context_defaults3(vs->vid_ictx, icodec); avcodec_get_context_defaults3(vs->vid_octx, ocodec); + vs->vid_ictx->thread_count = sysconf(_SC_NPROCESSORS_ONLN); + vs->vid_octx->thread_count = sysconf(_SC_NPROCESSORS_ONLN); + vs->vid_dec_frame = avcodec_alloc_frame(); vs->vid_enc_frame = avcodec_alloc_frame();