MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_thread_flush

Function ff_thread_flush

libavcodec/pthread_frame.c:979–1006  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

977}
978
979av_cold void ff_thread_flush(AVCodecContext *avctx)
980{
981 int i;
982 FrameThreadContext *fctx = avctx->internal->thread_ctx;
983
984 if (!fctx) return;
985
986 park_frame_worker_threads(fctx, avctx->thread_count);
987 if (fctx->prev_thread) {
988 if (fctx->prev_thread != &fctx->threads[0])
989 update_context_from_thread(fctx->threads[0].avctx, fctx->prev_thread->avctx, 0);
990 }
991
992 fctx->next_decoding = fctx->next_finished = 0;
993 fctx->prev_thread = NULL;
994
995 decoded_frames_flush(&fctx->df);
996 fctx->result = 0;
997
998 for (i = 0; i < avctx->thread_count; i++) {
999 PerThreadContext *p = &fctx->threads[i];
1000
1001 decoded_frames_flush(&p->df);
1002 p->result = 0;
1003
1004 avcodec_flush_buffers(p->avctx);
1005 }
1006}
1007
1008int ff_thread_can_start_frame(AVCodecContext *avctx)
1009{

Callers 1

avcodec_flush_buffersFunction · 0.85

Calls 4

decoded_frames_flushFunction · 0.85
avcodec_flush_buffersFunction · 0.85

Tested by

no test coverage detected