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

Function hb_buffer_swap_copy

libhb/fifo.c:1003–1014  ·  view source on GitHub ↗

this routine 'moves' data from src to dst by interchanging 'data', 'size' & 'alloc' between them and copying the rest of the fields from src to dst.

Source from the content-addressed store, hash-verified

1001// 'size' & 'alloc' between them and copying the rest of the fields
1002// from src to dst.
1003void hb_buffer_swap_copy( hb_buffer_t *src, hb_buffer_t *dst )
1004{
1005 uint8_t *data = dst->data;
1006 int size = dst->size;
1007 int alloc = dst->alloc;
1008
1009 *dst = *src;
1010
1011 src->data = data;
1012 src->size = size;
1013 src->alloc = alloc;
1014}
1015
1016static void free_buffer_resources(hb_buffer_t *b)
1017{

Callers 1

hb_buffer_reduceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected