Commit 4552d854 authored by conrad's avatar conrad

Merge branch '1.0-stable'

parents f9ef2a04 3fc79474
......@@ -174,8 +174,15 @@ auto_theora (OGGZ * oggz, long serialno, unsigned char * data, long length, void
OGGZ_AUTO_MULT * (ogg_int64_t)fps_denominator);
oggz_set_granuleshift (oggz, serialno, keyframe_shift);
if (version > THEORA_VERSION(3,2,0))
oggz_set_first_granule (oggz, serialno, 1);
/* the theora granpos->time calculation always adds one to the
index, but 3.2.0 streams count from zero and later versions count
from one. So... for a 3.2.0 stream, the intitial frame number is
zero, but we add one (or in this case, subtract -1 in
oggz_metric_default_granuleshift). For 3.2.1 and later, we
subtract one from the first frame number (1) to get an initial index
of zero, then add one to compute time for a net change of zero */
if (version < THEORA_VERSION(3,2,0))
oggz_set_first_granule (oggz, serialno, -1);
oggz_stream_set_numheaders (oggz, serialno, 3);
......
......@@ -334,11 +334,14 @@ oggz_sort (OSData * osdata, FILE * outfile)
if (osdata->verbose)
printf ("Moo\n");
}
} else if (osdata->verbose) {
} else {
if (input == NULL) {
printf ("*** index %d NULL\n", i);
if (osdata->verbose)
printf ("*** index %d NULL, removing\n", i);
i--;
} else {
printf ("*** No page from index %d\n", i);
if (osdata->verbose)
printf ("*** No page from index %d\n", i);
}
}
}
......@@ -351,6 +354,7 @@ oggz_sort (OSData * osdata, FILE * outfile)
if (min_i != -1) {
input = (OSInput *) oggz_table_nth (osdata->inputs, min_i, &key);
og = input->og;
checked_fwrite (og->header, 1, og->header_len, outfile);
checked_fwrite (og->body, 1, og->body_len, 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