[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash/server timers.cpp asobj/NetStreamFfmpeg.cpp
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash/server timers.cpp asobj/NetStreamFfmpeg.cpp |
Date: |
Sat, 02 Jun 2007 18:19:54 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/06/02 18:19:54
Modified files:
server : timers.cpp
server/asobj : NetStreamFfmpeg.cpp
Log message:
Just a few WARNING comments (please read) and log_debugs prior to abort
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/timers.cpp?cvsroot=gnash&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.82&r2=1.83
Patches:
Index: timers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/timers.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- timers.cpp 28 May 2007 15:41:07 -0000 1.31
+++ timers.cpp 2 Jun 2007 18:19:54 -0000 1.32
@@ -19,7 +19,7 @@
//
//
-/* $Id: timers.cpp,v 1.31 2007/05/28 15:41:07 ann Exp $ */
+/* $Id: timers.cpp,v 1.32 2007/06/02 18:19:54 strk Exp $ */
#include "timers.h"
#include "as_function.h" // for class as_function
@@ -91,8 +91,11 @@
if (_start)
{
uint64_t now = tu_timer::get_profile_ticks();
- //log_msg("now: %lu", now);
- assert(now > _start);
+ if (now <= _start)
+ {
+ log_debug("now: %lu, _start: %lu (aborting)", now,
_start);
+ abort();
+ }
//printf("FIXME: %s: now is %f, start time is %f, interval is
%f\n", __FUNCTION__, now, _start, _interval);
if (now > _start + _interval)
Index: asobj/NetStreamFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- asobj/NetStreamFfmpeg.cpp 1 Jun 2007 23:36:48 -0000 1.82
+++ asobj/NetStreamFfmpeg.cpp 2 Jun 2007 18:19:54 -0000 1.83
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: NetStreamFfmpeg.cpp,v 1.82 2007/06/01 23:36:48 bjacques Exp $ */
+/* $Id: NetStreamFfmpeg.cpp,v 1.83 2007/06/02 18:19:54 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -124,6 +124,10 @@
delete _decodeThread;
}
+ else
+ {
+ // WARNING: decoder might be still waiting on the decode_wait
condition...
+ }
// When closing gnash before playback is finished, the soundhandler
@@ -665,7 +669,16 @@
if (ns->m_pause || (ns->m_qvideo.size() > 10 &&
ns->m_qaudio.size() > 10))
{
- assert(ns->m_go);
+ if ( ! ns->m_go )
+ {
+ log_debug("m_go=%d,
m_start_onbuffer=%d, qVideoSize=%d, qAudioSize=%d", ns->m_go,
ns->m_start_onbuffer, ns->m_qvideo.size(), ns->m_qaudio.size());
+ // decodeFLVFrame above might set m_go
to false when parsed buffer is over
+ // note that when parsed buffer is over
decodeFLVFrame would return false,
+ // but the break above might still not
be reached due to m_start_onbuffer
+ // or queue sizes not being 0.
+ assert(0);
+ break;
+ }
#ifdef GNASH_DEBUG_THREADS
log_debug("Waiting on lock..");
#endif
@@ -686,6 +699,7 @@
// if the queue is full we wait until someone notifies
us that data is needed.
if (ns->m_pause || ((ns->m_qvideo.size() > 0 &&
ns->m_qaudio.size() > 0) && ns->m_unqueued_data))
{
+ assert ( ns->m_go ); // or we'll have a problem
ending the wait...
#ifdef GNASH_DEBUG_THREADS
log_debug("Waiting on lock..");
#endif
@@ -1276,7 +1290,11 @@
{
// assert(decoding_mutex is locked by this thread!)
- if (!m_pause) return;
+ if (!m_pause)
+ {
+ // WARNING: decoder might be still waiting on the decode_wait
condition...
+ return;
+ }
m_pause = false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash/server timers.cpp asobj/NetStreamFfmpeg.cpp,
Sandro Santilli <=