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

Function encavcodecaWork

libhb/encavcodecaudio.c:549–579  ·  view source on GitHub ↗

* Work *********************************************************************** * **********************************************************************/

Source from the content-addressed store, hash-verified

547 *
548 **********************************************************************/
549static int encavcodecaWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
550 hb_buffer_t ** buf_out )
551{
552 hb_work_private_t * pv = w->private_data;
553 hb_buffer_t * in = *buf_in;
554 hb_buffer_list_t list;
555
556 if (pv->context == NULL || pv->context->codec == NULL)
557 {
558 hb_error("encavcodecaudio: codec context is uninitialized");
559 return HB_WORK_DONE;
560 }
561
562 hb_buffer_list_clear(&list);
563 if (in->s.flags & HB_BUF_FLAG_EOF)
564 {
565 /* EOF on input - send it downstream & say we're done */
566 Flush(w, &list);
567 hb_buffer_list_append(&list, hb_buffer_eof_init());
568 *buf_out = hb_buffer_list_clear(&list);
569 return HB_WORK_DONE;
570 }
571
572 hb_list_add( pv->list, in );
573 *buf_in = NULL;
574
575 Encode(w, &list);
576 *buf_out = hb_buffer_list_clear(&list);
577
578 return HB_WORK_OK;
579}
580
581

Callers

nothing calls this directly

Calls 7

hb_errorFunction · 0.85
hb_buffer_list_clearFunction · 0.85
hb_buffer_list_appendFunction · 0.85
hb_buffer_eof_initFunction · 0.85
hb_list_addFunction · 0.85
FlushFunction · 0.70
EncodeFunction · 0.70

Tested by

no test coverage detected