summaryrefslogtreecommitdiff
path: root/lib/buffer_queue_pool.cpp
diff options
context:
space:
mode:
authorJosh Blum2013-04-06 09:27:47 -0700
committerJosh Blum2013-04-06 09:27:47 -0700
commita4f73d7a43558f0eaae6f689abc73c202d5ababb (patch)
treed76caddb2678c47a4cdee86185abe95cb9305de8 /lib/buffer_queue_pool.cpp
parentdcd1a78f48dad1894921394ae75251e7eb9d1de3 (diff)
downloadsandhi-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.cpp6
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);
}