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

Function hb_buffer_list_prepend

libhb/common.c:3875–3906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3873}
3874
3875void hb_buffer_list_prepend(hb_buffer_list_t *list, hb_buffer_t *buf)
3876{
3877 int count = 1;
3878 int size = 0;
3879 hb_buffer_t *end = buf;
3880
3881 if (buf == NULL)
3882 {
3883 return;
3884 }
3885
3886 // Input buffer may be a list of buffers, find the end.
3887 size += buf->size;
3888 while (end != NULL && end->next != NULL)
3889 {
3890 end = end->next;
3891 size += end->size;
3892 count++;
3893 }
3894 if (list->tail == NULL)
3895 {
3896 list->head = buf;
3897 list->tail = end;
3898 }
3899 else
3900 {
3901 end->next = list->head;
3902 list->head = buf;
3903 }
3904 list->count += count;
3905 list->size += size;
3906}
3907
3908hb_buffer_t* hb_buffer_list_rem_head(hb_buffer_list_t *list)
3909{

Callers 2

mergeSubtitleOverlapsFunction · 0.85
avfilter_workFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected