1

Closed

Ogg Reader is not re-entrant

description

The NVorbis.Ogg.ContainerReader should be extended to synchronize reads, especially when reading in a new page. Currently, multiple threads can trigger concurrent page reads, causing sync errors.
Closed Feb 6, 2013 at 12:35 PM by ioctlLR
Appears to be fixed

comments

ioctlLR wrote Nov 6, 2012 at 10:05 PM

Add "ThreadSafeStream" class:
  • per-thread "Position" property
  • synchronize access so only one thread at a time is actually accessing the underlying stream
Add synchronization so only one thread at a time is actually reading in new pages.
  • expose the sync pieces to PacketReader so it doesn't call GatherNextPage(int) unless it has to when its turn comes up
This should allow multiple logical streams to be read at the same time.