gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog backend/sound_handler_sdl.cpp s...


From: Tomas Groth
Subject: [Gnash-commit] gnash ChangeLog backend/sound_handler_sdl.cpp s...
Date: Mon, 21 May 2007 16:23:43 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Tomas Groth <tgc>       07/05/21 16:23:43

Modified files:
        .              : ChangeLog 
        backend        : sound_handler_sdl.cpp 
        server/asobj   : NetStreamFfmpeg.cpp 

Log message:
                * backend/sound_handler_sdl.cpp: Only try to detach video-sound
                  input, if it exists.
                * server/asobj/NetStreamFfmpeg.cpp: Shutdown the decoding thread
                  proberbly.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3298&r2=1.3299
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamFfmpeg.cpp?cvsroot=gnash&r1=1.53&r2=1.54

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3298
retrieving revision 1.3299
diff -u -b -r1.3298 -r1.3299
--- ChangeLog   21 May 2007 15:46:48 -0000      1.3298
+++ ChangeLog   21 May 2007 16:23:42 -0000      1.3299
@@ -1,3 +1,10 @@
+2007-05-21 Tomas Groth Christensen <address@hidden>
+
+       * backend/sound_handler_sdl.cpp: Only try to detach video-sound
+         input, if it exists.
+       * server/asobj/NetStreamFfmpeg.cpp: Shutdown the decoding thread
+         proberbly.
+
 2007-05-21  Rob Savoye  <address@hidden>
 
        * libbase/Makefile.am: Build the installable libltdl before

Index: backend/sound_handler_sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- backend/sound_handler_sdl.cpp       18 May 2007 15:30:41 -0000      1.61
+++ backend/sound_handler_sdl.cpp       21 May 2007 16:23:42 -0000      1.62
@@ -18,7 +18,7 @@
 // Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
 // which has been donated to the Public Domain.
 
-// $Id: sound_handler_sdl.cpp,v 1.61 2007/05/18 15:30:41 martinwguy Exp $
+// $Id: sound_handler_sdl.cpp,v 1.62 2007/05/21 16:23:42 tgc Exp $
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -521,8 +521,13 @@
 
 void   SDL_sound_handler::detach_aux_streamer(void* owner)
 {
+       aux_streamer_ptr p;     
+       if (m_aux_streamer.get(owner, &p))
+       {
        --soundsPlaying;
        m_aux_streamer.erase(owner);
+       }
+
 }
 
 

Index: server/asobj/NetStreamFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamFfmpeg.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- server/asobj/NetStreamFfmpeg.cpp    19 May 2007 21:18:34 -0000      1.53
+++ server/asobj/NetStreamFfmpeg.cpp    21 May 2007 16:23:42 -0000      1.54
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: NetStreamFfmpeg.cpp,v 1.53 2007/05/19 21:18:34 tgc Exp $ */
+/* $Id: NetStreamFfmpeg.cpp,v 1.54 2007/05/21 16:23:42 tgc Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -108,6 +108,7 @@
        {
                // terminate thread
                m_go = false;
+               decode_wait.notify_one();
 
                // wait till thread is complete before main continues
                _decodeThread->join();
@@ -618,20 +619,18 @@
        // Loop while we're playing
        while (ns->m_go)
        {
-               // If paused, wait for being unpaused
-               if (ns->m_pause) ns->decode_wait.wait(lock);
-
                // If we have problems with decoding - break
                if (ns->read_frame() == false && ns->m_start_onbuffer == false 
&& ns->m_qvideo.size() == 0)
                {
                        break;
                }
 
-               // If the queue is full we wait until someone notifies us that 
data is needed.
-               if (ns->m_qvideo.size() > 0 && ns->m_unqueued_data)
-               {
+               // If paused, wait for being unpaused, or
+               // 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_unqueued_data)) { 
                        ns->decode_wait.wait(lock);
                }
+
        }
        ns->m_go = false;
        ns->setStatus(playStop);
@@ -758,6 +757,7 @@
                // FIXME: is this the right value for packet.dts?
                packet.pts = packet.dts = 
static_cast<int64_t>(frame->timestamp);
                rc = 0;
+
        } else {
                rc = av_read_frame(m_FormatCtx, &packet);
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]