{
ogg_sync_state oss;
ogg_page op;
- long len = numbytes;
char *buf;
int ret, i, j, frames_per_chunk, ct_size;
long long unsigned num_frames = 0;
ogg_sync_init(&oss);
ret = -E_OGG_SYNC;
- buf = ogg_sync_buffer(&oss, len);
+ buf = ogg_sync_buffer(&oss, numbytes);
if (!buf)
goto out;
- memcpy(buf, map, len);
+ memcpy(buf, map, numbytes);
ret = -E_OGG_SYNC;
- if (ogg_sync_wrote(&oss, len) < 0)
+ if (ogg_sync_wrote(&oss, numbytes) < 0)
goto out;
ret = process_ogg_packets(&oss, afhi, ci);
if (ret < 0)
{
int ret;
- PARA_DEBUG_LOG("header/body: %lu/%lu\n", op->header_len, op->body_len);
+ PARA_DEBUG_LOG("header/body: %li/%li\n", op->header_len, op->body_len);
ret = xwrite(fd, (const char *)op->header, op->header_len);
if (ret < 0)
return ret;
goto out;
continue;
}
- PARA_DEBUG_LOG("packet: bytes: %d, granule: %d, packetno: %u\n",
+ PARA_DEBUG_LOG("packet: bytes: %d, granule: %d, packetno: %d\n",
(int)packet.bytes, (int)packet.granulepos,
(int)packet.packetno);
/* ignore meta data packet which we replaced */
#endif
if (ret <= 0)
break;
- PARA_DEBUG_LOG("writing page (%lu bytes)\n",
+ PARA_DEBUG_LOG("writing page (%li bytes)\n",
op.header_len + op.body_len);
ret = write_ogg_page(fd, &op);
if (ret < 0)