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

Function hb_buffer_remove_side_data

libhb/fifo.c:569–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567}
568
569void hb_buffer_remove_side_data(hb_buffer_t *buf, enum AVFrameSideDataType type)
570{
571 if (buf->storage_type == AVFRAME)
572 {
573 AVFrame *frame = (AVFrame *)buf->storage;
574 av_frame_remove_side_data(frame, type);
575 buf->nb_side_data = frame->nb_side_data;
576 }
577 else
578 {
579 for (int i = buf->nb_side_data - 1; i >= 0; i--)
580 {
581 AVFrameSideData *sd = buf->side_data[i];
582 if (sd->type == type)
583 {
584 free_side_data((AVFrameSideData **)&buf->side_data[i]);
585 buf->side_data[i] = buf->side_data[buf->nb_side_data - 1];
586 buf->nb_side_data--;
587 }
588 }
589 }
590}
591
592void hb_buffer_wipe_side_data(hb_buffer_t *buf)
593{

Callers 1

rpu_workFunction · 0.85

Calls 1

free_side_dataFunction · 0.70

Tested by

no test coverage detected