pthreads: reset active_thread_type when slice thread_init returrns early
This commit is contained in:
@ -237,8 +237,10 @@ static int thread_init(AVCodecContext *avctx)
|
|||||||
ThreadContext *c;
|
ThreadContext *c;
|
||||||
int thread_count = avctx->thread_count;
|
int thread_count = avctx->thread_count;
|
||||||
|
|
||||||
if (thread_count <= 1)
|
if (thread_count <= 1) {
|
||||||
|
avctx->active_thread_type = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
c = av_mallocz(sizeof(ThreadContext));
|
c = av_mallocz(sizeof(ThreadContext));
|
||||||
if (!c)
|
if (!c)
|
||||||
|
Reference in New Issue
Block a user