| 1006 | } |
| 1007 | |
| 1008 | int ff_thread_can_start_frame(AVCodecContext *avctx) |
| 1009 | { |
| 1010 | if ((avctx->active_thread_type & FF_THREAD_FRAME) && |
| 1011 | ffcodec(avctx->codec)->update_thread_context) { |
| 1012 | PerThreadContext *p = avctx->internal->thread_ctx; |
| 1013 | |
| 1014 | if (atomic_load(&p->state) != STATE_SETTING_UP) |
| 1015 | return 0; |
| 1016 | } |
| 1017 | |
| 1018 | return 1; |
| 1019 | } |
| 1020 | |
| 1021 | static int thread_get_buffer_internal(AVCodecContext *avctx, AVFrame *f, int flags) |
| 1022 | { |