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

Function hb_buffer_reduce

libhb/fifo.c:491–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491void hb_buffer_reduce( hb_buffer_t * b, int size )
492{
493 if (b->storage_type == STANDARD && (size < b->alloc / 8 || b->data == NULL))
494 {
495 hb_buffer_t *tmp = hb_buffer_init(size);
496 if (tmp)
497 {
498 hb_buffer_swap_copy(b, tmp);
499 if (tmp->data)
500 {
501 memcpy(b->data, tmp->data, size);
502 }
503 tmp->next = NULL;
504 }
505 hb_buffer_close(&tmp);
506 }
507}
508
509AVFrameSideData *hb_buffer_new_side_data_from_buf(hb_buffer_t *buf,
510 enum AVFrameSideDataType type,

Callers 1

mf_pushFunction · 0.85

Calls 3

hb_buffer_initFunction · 0.85
hb_buffer_swap_copyFunction · 0.85
hb_buffer_closeFunction · 0.85

Tested by

no test coverage detected