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

Function sch_alloc

fftools/ffmpeg_sched.c:595–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593};
594
595Scheduler *sch_alloc(void)
596{
597 Scheduler *sch;
598 int ret;
599
600 sch = av_mallocz(sizeof(*sch));
601 if (!sch)
602 return NULL;
603
604 sch->class = &scheduler_class;
605 sch->sdp_auto = 1;
606
607 ret = pthread_mutex_init(&sch->schedule_lock, NULL);
608 if (ret)
609 goto fail;
610
611 ret = pthread_mutex_init(&sch->mux_ready_lock, NULL);
612 if (ret)
613 goto fail;
614
615 ret = pthread_mutex_init(&sch->finish_lock, NULL);
616 if (ret)
617 goto fail;
618
619 ret = pthread_cond_init(&sch->finish_cond, NULL);
620 if (ret)
621 goto fail;
622
623 return sch;
624fail:
625 sch_free(&sch);
626 return NULL;
627}
628
629int sch_sdp_filename(Scheduler *sch, const char *sdp_filename)
630{

Callers 1

mainFunction · 0.85

Calls 4

sch_freeFunction · 0.85
av_malloczFunction · 0.50
pthread_mutex_initFunction · 0.50
pthread_cond_initFunction · 0.50

Tested by

no test coverage detected