send cc_buf to the CC decoder(s)
| 1117 | |
| 1118 | // send cc_buf to the CC decoder(s) |
| 1119 | static 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 | |
| 1140 | static hb_buffer_t * cc_fill_buffer(hb_work_private_t *pv, uint8_t *cc, int size) |
| 1141 | { |
no test coverage detected