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

Function hb_chapter_enqueue

libhb/common.c:7009–7028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7007}
7008
7009void hb_chapter_enqueue(hb_chapter_queue_t *q, hb_buffer_t *buf)
7010{
7011 /*
7012 * Chapter markers are sometimes so close we can get a new
7013 * one before the previous goes through the encoding queue.
7014 *
7015 * Dropping markers can cause weird side-effects downstream,
7016 * including but not limited to missing chapters in the
7017 * output, so we need to save it somehow.
7018 */
7019 hb_chapter_queue_item_t *item = malloc(sizeof(hb_chapter_queue_item_t));
7020 if (item != NULL)
7021 {
7022 item->start = buf->s.start;
7023 item->new_chap = buf->s.new_chap;
7024 // Make sure work_loop doesn't also copy the chapter mark
7025 buf->s.new_chap = 0;
7026 hb_list_add(q->list_chapter, item);
7027 }
7028}
7029
7030void hb_chapter_dequeue(hb_chapter_queue_t *q, hb_buffer_t *buf)
7031{

Callers 5

x265_encodeFunction · 0.85
sendFunction · 0.85
x264_encodeFunction · 0.85
EncodeFunction · 0.85
hb_vt_sendFunction · 0.85

Calls 1

hb_list_addFunction · 0.85

Tested by

no test coverage detected