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

Function hb_buffer_list_rem

libhb/common.c:3965–3997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3963}
3964
3965hb_buffer_t* hb_buffer_list_rem(hb_buffer_list_t *list, hb_buffer_t * b)
3966{
3967 hb_buffer_t * a;
3968
3969 if (list == NULL)
3970 {
3971 return NULL;
3972 }
3973 if (b == list->head)
3974 {
3975 return hb_buffer_list_rem_head(list);
3976 }
3977 a = list->head;
3978 while (a != NULL && a->next != b)
3979 {
3980 a = a->next;
3981 }
3982 if (a == NULL)
3983 {
3984 // Buffer is not in the list
3985 return NULL;
3986 }
3987 list->count--;
3988 list->size -= b->size;
3989 a->next = b->next;
3990 if (list->tail == b)
3991 {
3992 list->tail = a;
3993 }
3994 b->next = NULL;
3995
3996 return b;
3997}
3998
3999hb_buffer_t* hb_buffer_list_head(hb_buffer_list_t *list)
4000{

Callers 3

render_vobsubsFunction · 0.85
render_pgs_subsFunction · 0.85
mergeSubtitleOverlapsFunction · 0.85

Calls 1

hb_buffer_list_rem_headFunction · 0.85

Tested by

no test coverage detected