Commit f350abe6 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry Committed by conrad

Fix granulepos parsing when reverting in oggz-dump.

It was not looking for calc. gpos on packets which did not
 originally have a granule position, nor was it looking for the |
 that's used in split granule positions (a la Theora).
parent dc953285
......@@ -416,11 +416,17 @@ revert_file (char * infilename)
is_packetinfo = 0;
if (sscanf (&line[line_offset], "%x: serialno %ld, granulepos %" PRId64 ", packetno %" PRId64 "%n",
&offset, &serialno, &granulepos, &packetno,
&line_offset) >= 4 ||
sscanf (&line[line_offset], "%x: serialno %ld, calc. gpos %" PRId64 ", packetno %" PRId64 "%n",
&offset, &serialno, &granulepos, &packetno,
&line_offset) >= 4) {
is_packetinfo = 1;
} else {
if (sscanf (&line[line_offset], "%x: serialno %ld, granulepos %" PRId64 "%" PRId64 ", packetno %" PRId64 "%n",
if (sscanf (&line[line_offset], "%x: serialno %ld, granulepos %" PRId64 "|%" PRId64 ", packetno %" PRId64 "%n",
&offset, &serialno, &iframe, &pframe, &packetno,
&line_offset) >= 5 ||
sscanf (&line[line_offset], "%x: serialno %ld, calc. gpos %" PRId64 "|%" PRId64 ", packetno %" PRId64 "%n",
&offset, &serialno, &iframe, &pframe, &packetno,
&line_offset) >= 5) {
int granuleshift = oggz_get_granuleshift (oggz, serialno);
......
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