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

Function hb_buffer_list_append

libhb/common.c:3842–3873  ·  view source on GitHub ↗

* hb_buffer_list implementation *********************************************************************/

Source from the content-addressed store, hash-verified

3840 * hb_buffer_list implementation
3841 *********************************************************************/
3842void hb_buffer_list_append(hb_buffer_list_t *list, hb_buffer_t *buf)
3843{
3844 int count = 1;
3845 int size = 0;
3846 hb_buffer_t *end = buf;
3847
3848 if (buf == NULL)
3849 {
3850 return;
3851 }
3852
3853 // Input buffer may be a list of buffers, find the end.
3854 size += buf->size;
3855 while (end != NULL && end->next != NULL)
3856 {
3857 end = end->next;
3858 size += end->size;
3859 count++;
3860 }
3861 if (list->tail == NULL)
3862 {
3863 list->head = buf;
3864 list->tail = end;
3865 }
3866 else
3867 {
3868 list->tail->next = buf;
3869 list->tail = end;
3870 }
3871 list->count += count;
3872 list->size += size;
3873}
3874
3875void hb_buffer_list_prepend(hb_buffer_list_t *list, hb_buffer_t *buf)
3876{

Callers 15

get_packetsFunction · 0.85
encavcodecaWorkFunction · 0.85
render_vobsubsFunction · 0.85
vobsub_workFunction · 0.85
render_ssa_subsFunction · 0.85
render_pgs_subsFunction · 0.85
pgssub_workFunction · 0.85
encvorbisWorkFunction · 0.85
CreateSilenceBufFunction · 0.85
CreateBlackBufFunction · 0.85
findOverlapFunction · 0.85
mergeSubtitleOverlapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected