MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / Init

Function Init

libhb/encavsub.c:306–326  ·  view source on GitHub ↗

* Init *********************************************************************** * Initialize hb_work_private_t data **********************************************************************/

Source from the content-addressed store, hash-verified

304 * Initialize hb_work_private_t data
305 **********************************************************************/
306static int Init(hb_work_object_t *w, hb_job_t *job)
307{
308 hb_work_private_t *pv;
309
310 pv = calloc(1, sizeof(hb_work_private_t));
311 if (pv == NULL)
312 {
313 hb_error("encsubInit: calloc private data failed");
314 return 1;
315 }
316
317 pv->ctx = encavsubInit(w, job);
318 if (pv->ctx == NULL)
319 {
320 free(pv);
321 return 1;
322 }
323 w->private_data = pv;
324
325 return 0;
326}
327
328/***********************************************************************
329 * Close

Callers

nothing calls this directly

Calls 2

hb_errorFunction · 0.85
encavsubInitFunction · 0.85

Tested by

no test coverage detected