Check that we're not about to deadlock if the queue is full and we can't repeat-write.
[dcpomatic.git] / src / lib / writer.cc
index 39d6f61188aa23f3610c77acf0fe4a73452cea1a..b135f4321c2729a4d1c5ea761e0f219a19bbf331 100644 (file)
@@ -342,6 +342,8 @@ try
                                break;
                        }
 
+                       DCPOMATIC_ASSERT (_queue.size() < _maximum_queue_size);
+
                        /* Nothing to do: wait until something happens which may indicate that we do */
                        LOG_TIMING (N_("writer-sleep queue=%1"), _queue.size());
                        _empty_condition.wait (lock);