static void addmul(unsigned char *dst1, const unsigned char *src1,
unsigned char c, int sz)
{
+ unsigned char *dst, *lim, *col;
+ const unsigned char *src = src1;
+
if (c == 0)
return;
- unsigned char *dst = dst1, *lim = &dst[sz - UNROLL + 1],
- *col = gf_mul_table[c];
- const unsigned char *src = src1;
+
+ dst = dst1;
+ lim = &dst[sz - UNROLL + 1];
+ col = gf_mul_table[c];
for (; dst < lim; dst += UNROLL, src += UNROLL) {
dst[0] ^= col[src[0]];
return 1;
}
if (packet_num == 1) {
- PARA_INFO_LOG("replacing metadata packet\n");
ogg_packet replacement = *packet;
+ PARA_INFO_LOG("replacing metadata packet\n");
replacement.packet = dummy_packet;
replacement.bytes = sizeof(dummy_packet);
ret = ogg_stream_packetin(&vghd->os, &replacement);
shi->nframes = h->frames_per_packet;
shi->channels = h->nb_channels;
if (shi->channels != 1) {
- shi->stereo = (SpeexStereoState)SPEEX_STEREO_STATE_INIT;
SpeexCallback callback = {
.callback_id = SPEEX_INBAND_STEREO,
.func = speex_std_stereo_request_handler,
.data = &shi->stereo,
};
+ shi->stereo = (SpeexStereoState)SPEEX_STEREO_STATE_INIT;
ret = spx_ctl(shi->state, SPEEX_SET_HANDLER, &callback);
if (ret < 0)
goto out;
/* setup header slices */
buf = vsst->header_buf;
for (i = 0; i < g->num_header_slices; i++) {
+ uint32_t payload_size;
if (buf + g->slice_bytes <= vsst->header_buf + vsst->header_len) {
fc->src_data[i] = (const unsigned char *)buf;
buf += g->slice_bytes;
* goes beyond the buffer. This slice will not be fully
* used.
*/
- uint32_t payload_size = vsst->header_buf
- + vsst->header_len - buf;
+ payload_size = vsst->header_buf + vsst->header_len - buf;
memcpy(fc->extra_header_buf, buf, payload_size);
if (payload_size < g->slice_bytes)
memset(fc->extra_header_buf + payload_size, 0,