diff options
author | Josh Blum | 2013-04-06 09:27:47 -0700 |
---|---|---|
committer | Josh Blum | 2013-04-06 09:27:47 -0700 |
commit | a4f73d7a43558f0eaae6f689abc73c202d5ababb (patch) | |
tree | d76caddb2678c47a4cdee86185abe95cb9305de8 /lib/buffer_queue_pool.cpp | |
parent | dcd1a78f48dad1894921394ae75251e7eb9d1de3 (diff) | |
download | sandhi-a4f73d7a43558f0eaae6f689abc73c202d5ababb.tar.gz sandhi-a4f73d7a43558f0eaae6f689abc73c202d5ababb.tar.bz2 sandhi-a4f73d7a43558f0eaae6f689abc73c202d5ababb.zip |
gras: fixed a bug in swapping out buffer queues
The default pool buffer was getting circ buffers
when they went out from the deref in this circumstance:
Basically, the circ buffs were created and deref'd
before the circ queue was set into the output queue.
This seems to fix the pfb clock sync issue,
but not others is #42
Diffstat (limited to 'lib/buffer_queue_pool.cpp')
-rw-r--r-- | lib/buffer_queue_pool.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/buffer_queue_pool.cpp b/lib/buffer_queue_pool.cpp index db9b68a..003dec3 100644 --- a/lib/buffer_queue_pool.cpp +++ b/lib/buffer_queue_pool.cpp @@ -37,6 +37,12 @@ struct BufferQueuePool : BufferQueue void push(const SBuffer &buff) { + //is it my buffer? otherwise dont keep it + if (buff->config.token.lock() != _token) return; + + //should never get a buffer from a circ queue + ASSERT(buff.get_user_index() == size_t(~0)); + _queue.push_back(buff); } |