|
|
@ -570,7 +570,7 @@ static int submit_packet(PerThreadContext *p, AVPacket *avpkt) |
|
|
|
pthread_cond_wait(&p->progress_cond, &p->progress_mutex); |
|
|
|
pthread_cond_wait(&p->progress_cond, &p->progress_mutex); |
|
|
|
|
|
|
|
|
|
|
|
if (p->state == STATE_GET_BUFFER) { |
|
|
|
if (p->state == STATE_GET_BUFFER) { |
|
|
|
p->result = p->avctx->get_buffer(p->avctx, p->requested_frame); |
|
|
|
p->result = ff_get_buffer(p->avctx, p->requested_frame); |
|
|
|
p->state = STATE_SETTING_UP; |
|
|
|
p->state = STATE_SETTING_UP; |
|
|
|
pthread_cond_signal(&p->progress_cond); |
|
|
|
pthread_cond_signal(&p->progress_cond); |
|
|
|
} |
|
|
|
} |
|
|
@ -921,7 +921,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f) |
|
|
|
|
|
|
|
|
|
|
|
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) { |
|
|
|
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) { |
|
|
|
f->thread_opaque = NULL; |
|
|
|
f->thread_opaque = NULL; |
|
|
|
return avctx->get_buffer(avctx, f); |
|
|
|
return ff_get_buffer(avctx, f); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (p->state != STATE_SETTING_UP && |
|
|
|
if (p->state != STATE_SETTING_UP && |
|
|
@ -943,7 +943,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f) |
|
|
|
|
|
|
|
|
|
|
|
if (avctx->thread_safe_callbacks || |
|
|
|
if (avctx->thread_safe_callbacks || |
|
|
|
avctx->get_buffer == avcodec_default_get_buffer) { |
|
|
|
avctx->get_buffer == avcodec_default_get_buffer) { |
|
|
|
err = avctx->get_buffer(avctx, f); |
|
|
|
err = ff_get_buffer(avctx, f); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
p->requested_frame = f; |
|
|
|
p->requested_frame = f; |
|
|
|
p->state = STATE_GET_BUFFER; |
|
|
|
p->state = STATE_GET_BUFFER; |
|
|
|