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

Function cc_send_to_decoder

libhb/decavcodec.c:1119–1138  ·  view source on GitHub ↗

send cc_buf to the CC decoder(s)

Source from the content-addressed store, hash-verified

1117
1118// send cc_buf to the CC decoder(s)
1119static void cc_send_to_decoder(hb_work_private_t *pv, hb_buffer_t *buf)
1120{
1121 if (buf == NULL)
1122 return;
1123
1124 // if there's more than one decoder for the captions send a copy
1125 // of the buffer to all.
1126 hb_subtitle_t *subtitle;
1127 int ii = 0, n = hb_list_count(pv->list_subtitle);
1128 while (--n > 0)
1129 {
1130 // make a copy of the buf then forward it to the decoder
1131 hb_buffer_t *cpy = hb_buffer_dup(buf);
1132
1133 subtitle = hb_list_item(pv->list_subtitle, ii++);
1134 hb_fifo_push(subtitle->fifo_in, cpy);
1135 }
1136 subtitle = hb_list_item(pv->list_subtitle, ii);
1137 hb_fifo_push( subtitle->fifo_in, buf );
1138}
1139
1140static hb_buffer_t * cc_fill_buffer(hb_work_private_t *pv, uint8_t *cc, int size)
1141{

Callers 1

copy_frameFunction · 0.85

Calls 4

hb_list_countFunction · 0.85
hb_buffer_dupFunction · 0.85
hb_list_itemFunction · 0.85
hb_fifo_pushFunction · 0.85

Tested by

no test coverage detected