[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog libbase/LoadThread.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog libbase/LoadThread.cpp |
Date: |
Tue, 10 Jun 2008 08:29:35 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/06/10 08:29:35
Modified files:
. : ChangeLog
libbase : LoadThread.cpp
Log message:
make seek() blocking, as advertised in method documentation.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6882&r2=1.6883
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/LoadThread.cpp?cvsroot=gnash&r1=1.28&r2=1.29
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6882
retrieving revision 1.6883
diff -u -b -r1.6882 -r1.6883
--- ChangeLog 10 Jun 2008 08:20:17 -0000 1.6882
+++ ChangeLog 10 Jun 2008 08:29:34 -0000 1.6883
@@ -1,3 +1,8 @@
+2008-06-10 Sandro Santilli <address@hidden>
+
+ * libbase/LoadThread.cpp: make seek() blocking, as advertised
+ in method documentation.
+
2008-06-10 Benjamin Wolsey <address@hidden>
* libmedia/gst/SoundHandlerGst.h: include <algorithm> for std::for_each.
Index: libbase/LoadThread.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/LoadThread.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- libbase/LoadThread.cpp 10 Jun 2008 07:14:30 -0000 1.28
+++ libbase/LoadThread.cpp 10 Jun 2008 08:29:35 -0000 1.29
@@ -119,11 +119,28 @@
// true is the new position is equal the wanted,
// or else return false
- if (_loadPosition >= static_cast<long>(pos)) {
+ while ( (!_completed) && (!cancelRequested()) && _loadPosition <
static_cast<long>(pos) )
+ {
+ usleep(100000); // 1/10 second WATCH FOR TIMEOUTS !
+ }
+
+ if (_loadPosition >= static_cast<long>(pos))
+ {
_userPosition = pos;
return 0;
- } else {
- _userPosition = _loadPosition;
+ }
+ else
+ {
+ // Completed (eof) or canceled
+ if ( _completed )
+ {
+ log_error("LoadThread::seek(%d) : can't seek there,
only %d bytes available", pos, _loadPosition);
+ }
+ else
+ {
+ assert( _cancelRequested );
+ log_error("LoadThread::seek(%d) : load cancellation
requested while seeking", pos);
+ }
return -1;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog libbase/LoadThread.cpp,
Sandro Santilli <=