[theora-dev] My issues with ogg and directshow...

Michael Smith msmith at xiph.org
Mon May 10 20:52:02 PDT 2004



On Tuesday 11 May 2004 13:17, Conrad Parker wrote:
> On Tue, May 11, 2004 at 01:02:20PM +1000, Michael Smith wrote:
> > On Tuesday 11 May 2004 13:10, illiminable wrote:
> > > This is from libfishsound, which is the wrapper i'm using to
> > > libvorbis...
> > >
> > > /* Make a fake ogg_packet structure to pass the data to libvorbis */
> > >   op.packet = buf;
> > >   op.bytes = bytes;
> > >   op.b_o_s = (fsv->packetno == 0) ? 1 : 0;
> > >   op.e_o_s = 0;
> > >   op.granulepos = 7;
> > >   op.packetno = fsv->packetno;
> > >
> > > I've been using it just fine, and i'm sure conrad has been for a lot
> > > longer, i'm sure he can explain why it works !... it clearly doesn't
> > > make that much difference... if any at all.
> > >
> > > A quick search in libvorbis, i can see it being stored a few places...
> > > but not actually used for anything !
> >
> > It's used (and is crucial for) proper handling of short packets ('short'
> > in the sense used in the recent mux meeting).
> >
> > If libfishsound is doing this, it's going to get decode wrong at start
> > and end of stream. It's even-more-obviously going to get it wrong at end
> > of stream since op.e_o_s never gets set in the code you gave above.
>
> er, no -- afaik libvorbis ignores the granulepos in the packet passed to
> vorbis_synthesis() -- vorbis_synthesis basically uses an ogg_packet just
> to get the data and length fields. The above pattern (creating a fake
> ogg packet to pass to vorbis_synthesis) is commonplace in implementations
> which separate demux and decode, not just libfishsound but also eg. xine,
> I think mplayer, and I'm sure others.

For those of you following along on the mailing list (I discussed this with 
Conrad off-list):

The granulepos field IS used in vorbis_synthesis, and so tracking this 
correctly from the ogg layer is definately required. This is a bug in 
fishsound which will cause (minor) decode errors at bos/eos.

Mike

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Theora-dev mailing list