Re: Theora packets with granulepos of -1
Ralph Giles <[email protected]>
| Newsgroups | gmane.comp.multimedia.ogg.theora.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Feb 23, 2009 at 7:07 AM, salsaman <[email protected]> wrote: > That is correct. You have to calculate the keyframe granule shift for > each file. For some strange reason best known to the developers this > is split over 2 bytes: Yeah, we messed up. Sorry. > keyframe_granule_shift = (char) ((hpacket[40] & 0x03) << 3); // lower 3 bits > keyframe_granule_shift |= (hpacket[41] & 0xe0) >> 5; // top 5 bits lower two bits of byte 40, actually, and upper 4 bits of byte 41. It's a 5 bit field. -r