[vorbis-dev] Question re: vorbis_block_clear()
Monty
xiphmont at xiph.org
Fri Jan 12 17:04:10 PST 2001
> The specific code that I'm referring to is in vorbis/lib/block.c:
>
> -----
> int vorbis_block_clear(vorbis_block *vb){
> if(vb->vd)
> if(vb->vd->analysisp)>
> oggpack_writeclear(&vb->opb);
> -----
Right-o. This means when you finally clean up, you need to clean up
vorbis_blocks before you clean up vorbis_dsp_state. The
vorbis_dsp_state is not affected by the above code, it's only checked.
> >From my reading of vorbis/lib/block.c::_vds_shared_init(), it *appears*
> that vd->analysisp will always be 1 for vorbis_dsp_states that are
> encoding. Is that right?
Yes.
> If that is so, then my fears are unfounded and all I need to do is cache
> the vorbis_dsp_state along with the vorbis_blocks and ogg_packets.
Right.
> Ok; so regardless of the thread-safety stuff, I need to cache the
> vorbis_dsp_state along with the vorbis_block and ogg_packets as well.
> This is doable.
>
> How are those struct interdependency docs coming along? ;-)
Keep bugging me. I'll probably be more easily influenced this week
than I have been past few months :-)
Monty
--- >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 'vorbis-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 Vorbis-dev
mailing list