diff --git a/veejay-current/veejay-server/libstream/v4l2utils.c b/veejay-current/veejay-server/libstream/v4l2utils.c index 888d720a..c1e9d5a8 100644 --- a/veejay-current/veejay-server/libstream/v4l2utils.c +++ b/veejay-current/veejay-server/libstream/v4l2utils.c @@ -578,29 +578,6 @@ static int v4l2_setup_avcodec_capture( v4l2info *v, int wid, int hei, int codec_ #if LIBAVCODEC_BUILD > 5400 v->c = avcodec_alloc_context3( v->codec ); - - int n_threads = 0; - - char *num_decode_threads = getenv( "VEEJAY_NUM_DECODE_THREADS" ); - if( num_decode_threads ) { - n_threads = atoi(num_decode_threads); - } - else { - veejay_msg(VEEJAY_MSG_DEBUG, "env VEEJAY_NUM_DECODE_THREADS not set!"); - int n = task_num_cpus(); - if( n > 1 ) - n_threads = 2; - if( n > 3 ) - n_threads = 4; - } - - veejay_msg(VEEJAY_MSG_DEBUG, "Using %d decoding threads (ffmpeg)", n_threads); - - if( n_threads > 0 ) { - v->c->thread_count = n_threads; - v->c->thread_type = FF_THREAD_FRAME; - } - #else v->c = avcodec_alloc_context(); #endif @@ -624,7 +601,7 @@ static int v4l2_setup_avcodec_capture( v4l2info *v, int wid, int hei, int codec_ e->context->thread_count = n_threads; e->context->thread_type = FF_THREAD_FRAME; } - + if( avcodec_open2( v->c, v->codec, NULL ) < 0 ) #else if( avcodec_open( v->c, v->codec ) < 0 )