if (len > PATH_MAX)
return NULL;
- s= malloc (sizeof (vcedit_state) + len + 1);
+ s = malloc (sizeof (vcedit_state) + len + 1);
if (!s)
return NULL;
/* comments */
oggpack_write (&opb, s->vc.comments, 32);
- for (i = 0; i < s->vc.comments; i++) {
+ for (i = 0; i < s->vc.comments; i++)
if (!s->vc.user_comments[i])
oggpack_write (&opb, 0, 32);
else {
_v_writestring (&opb, s->vc.user_comments[i],
s->vc.comment_lengths[i]);
}
- }
oggpack_write (&opb, 1, 1);
size = _blocksize (s, &packet);
granpos += size;
- if (need_flush) {
+ if (need_flush)
write = ogg_stream_flush (&stream, &page_out);
- } else if (need_out) {
+ else if (need_out)
write = ogg_stream_pageout (&stream, &page_out);
- }
if (write && !write_page (out, &page_out))
goto cleanup;
/* We copy the rest of the stream (other logical streams)
* through, a page at a time.
*/
- while ((result = ogg_sync_pageout (&s->oy, &page_out))) {
- /* Don't bother going through the rest, we can just
- * write the page out now
- */
+ while ((result = ogg_sync_pageout (&s->oy, &page_out)))
if (result == 1 && !write_page (out, &page_out))
goto cleanup;
- }
buffer = ogg_sync_buffer (&s->oy, CHUNKSIZE);
bytes = fread (buffer, 1, CHUNKSIZE, s->in);