Commit f76734f5 authored by conrad's avatar conrad
Browse files

fix oggz-comment writing bad data into streams

Patch by ogg.k.ogg.k:

I spent a while working out why ogginfo reported holes in one of my
streams - turns out oggz-comment writes bad data into the stream,
and oggz-validate doesn't see it (should it ?), oggz-dump displays
correct data, etc. Eventually, some combination of xxd and comparing
byte offsets led me to it... two hours later...

git-svn-id: 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 615e19e3
......@@ -293,8 +293,9 @@ edit_comments (OCData * ocdata, char * outfilename)
/* First, process headers packet-by-packet. */
oggz_set_read_callback (ocdata->reader, -1, read_packet, ocdata);
while ((n = oggz_read (ocdata->reader, 1024)) > 0) {
while (oggz_write_output (ocdata->writer, buf, n) > 0) {
fwrite (buf, 1, n, ocdata->outfile);
long nn;
while ((nn=oggz_write_output (ocdata->writer, buf, n)) > 0) {
fwrite (buf, 1, nn, ocdata->outfile);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment