Commit 466c337a authored by conrad's avatar conrad
Browse files

oggz-rip: use oggz_stream_get_content_type instead of local ot_identify(),

fix oggz_read() error check

git-svn-id: 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent f5a8e5fe
......@@ -181,8 +181,7 @@ orstream_new (OGGZ *oggz, const ORData *ordata, const ogg_page *og,
stream->streamid = streamid_count++;
stream->content_type = "unknown";
ident = ot_page_identify (oggz, og, NULL);
if (ident != NULL) stream->content_type = ident;
stream->content_type = oggz_stream_get_content_type (oggz, serialno);
if (ordata->verbose)
fprintf (stderr,
......@@ -257,11 +256,7 @@ oggz_rip (ORData * ordata)
oggz_set_read_page (ordata->reader, -1, read_page, ordata);
while ((n = oggz_read (ordata->reader, READ_SIZE))) {
if (n <= 0)
return n;
while ((n = oggz_read (ordata->reader, READ_SIZE)) != 0) {
if (ordata->verbose) {
fprintf (stderr, "\r Read %li k, wrote %li k ...\r",
(long) (oggz_tell (ordata->reader)/1024),
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