All pastes #716289 Raw Edit

Unnamed

public text v1 · immutable
#716289 ·published 2007-09-26 18:16 UTC
rendered paste body
Index: bytestream.cpp
===================================================================
--- bytestream.cpp      (revision 716538)
+++ bytestream.cpp      (working copy)
@@ -99,6 +99,7 @@
     m_buffering(false),
     m_firstReset(true)
 {
+    connect(this, SIGNAL(resetQueued()), this, SLOT(callStreamInterfaceReset()), Qt::BlockingQueuedConnection);
     connect(this, SIGNAL(needDataQueued()), this, SLOT(needData()), Qt::QueuedConnection);
     connect(this, SIGNAL(seekStreamQueued(qint64)), this, SLOT(syncSeekStream(qint64)), Qt::QueuedConnection);

@@ -444,6 +445,11 @@
     //kDebug(610) << "UNLOCKING m_mutex: ";
 }

+void ByteStream::callStreamInterfaceReset()
+{
+    StreamInterface::reset();
+}
+
 void ByteStream::syncSeekStream(qint64 offset)
 {
     PXINE_VDEBUG;
@@ -491,7 +497,7 @@
         return;
     }
     kDebug(610);
-    StreamInterface::reset();
+    emit resetQueued();
     m_currentPosition = 0;
     m_buffersize = 0;
     m_offset = 0;
Index: bytestream.h
===================================================================
--- bytestream.h        (revision 716538)
+++ bytestream.h        (working copy)
@@ -78,10 +78,12 @@
             off_t currentPosition() const;

         signals:
+            void resetQueued();
             void needDataQueued();
             void seekStreamQueued(qint64);

         private slots:
+            void callStreamInterfaceReset();
             void syncSeekStream(qint64 offset);
             void needData() { StreamInterface::needData(); }