Commit 234e68d6 authored by conrad's avatar conrad

oggz_write: Allow negative granulepos immediately after headers, for Dirac.

This in turn removes the "Granulepos decreasing within track" oggz-validate
error for this case.


git-svn-id: http://svn.annodex.net/liboggz/trunk@3781 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 16268f12
......@@ -271,7 +271,9 @@ oggz_write_feed (OGGZ * oggz, ogg_packet * op, long serialno, int flush,
if (strict) {
if (op->bytes < 0) return OGGZ_ERR_BAD_BYTES;
if (!suffix && b_o_s != stream->b_o_s) return OGGZ_ERR_BAD_B_O_S;
if (op->granulepos != -1 && op->granulepos < stream->granulepos)
if (op->granulepos != -1 && op->granulepos < stream->granulepos &&
/* Allow negative granulepos immediately after headers, for Dirac: */
!(stream->granulepos == 0 && op->granulepos < 0))
return OGGZ_ERR_BAD_GRANULEPOS;
/* Allow packetno == -1 to indicate oggz should fill it in; otherwise:
......
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