Changeset 3725 for liboggz

Show
Ignore:
Timestamp:
2008-09-24 02:08:59 (2 months ago)
Author:
conrad
Message:

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...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • liboggz/trunk/src/tools/oggz-comment.c

    r3674 r3725  
    294294  oggz_set_read_callback (ocdata->reader, -1, read_packet, ocdata); 
    295295  while ((n = oggz_read (ocdata->reader, 1024)) > 0) { 
    296     while (oggz_write_output (ocdata->writer, buf, n) > 0) { 
    297       fwrite (buf, 1, n, ocdata->outfile); 
     296    long nn; 
     297    while ((nn=oggz_write_output (ocdata->writer, buf, n)) > 0) { 
     298      fwrite (buf, 1, nn, ocdata->outfile); 
    298299    } 
    299300  }