Lines Matching defs:thread_avctx
138 AVCodecContext *thread_avctx = NULL;
214 thread_avctx = avcodec_alloc_context3(avctx->codec);
215 if (!thread_avctx) {
219 tmpv = thread_avctx->priv_data;
220 *thread_avctx = *avctx;
221 thread_avctx->priv_data = tmpv;
222 thread_avctx->internal = NULL;
223 thread_avctx->hw_frames_ctx = NULL;
224 ret = av_opt_copy(thread_avctx, avctx);
228 ret = av_opt_copy(thread_avctx->priv_data, avctx->priv_data);
232 thread_avctx->thread_count = 1;
233 thread_avctx->active_thread_type &= ~FF_THREAD_FRAME;
235 if ((ret = avcodec_open2(thread_avctx, avctx->codec, NULL)) < 0)
237 av_assert0(!thread_avctx->internal->frame_thread_encoder);
238 thread_avctx->internal->frame_thread_encoder = c;
239 if ((ret = pthread_create(&c->worker[i], NULL, worker, thread_avctx))) {
249 avcodec_close(thread_avctx);
250 av_freep(&thread_avctx);