CVSROOT: /sources/gnash Module name: gnash Changes by: Tomas Groth <tgc> 07/07/02 13:53:19
Modified files: . : ChangeLog backend : sound_handler_gst.cpp sound_handler_sdl.cpp Log message: * backend/sound_handler_gst.cpp: Moved creation of a tempoary variable to avoid an assertion failure. * backend/sound_handler_sdl.cpp: Improved error handling. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3634&r2=1.3635 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&r1=1.50&r2=1.51 http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_sdl.cpp?cvsroot=gnash&r1=1.71&r2=1.72 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3634 retrieving revision 1.3635 diff -u -b -r1.3634 -r1.3635 --- ChangeLog 2 Jul 2007 09:34:50 -0000 1.3634 +++ ChangeLog 2 Jul 2007 13:53:19 -0000 1.3635 @@ -1,3 +1,9 @@ +2007-07-02 Tomas Groth Christensen <[EMAIL PROTECTED]> + + * backend/sound_handler_gst.cpp: Moved creation of a tempoary + variable to avoid an assertion failure. + * backend/sound_handler_sdl.cpp: Improved error handling. + 2007-07-02 Udo Giacomozzi <[EMAIL PROTECTED]> * gui/gtk_glue_agg.cpp: Disable MIT-SHM when pixel format is not recognized Index: backend/sound_handler_gst.cpp =================================================================== RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -u -b -r1.50 -r1.51 --- backend/sound_handler_gst.cpp 1 Jul 2007 10:53:48 -0000 1.50 +++ backend/sound_handler_gst.cpp 2 Jul 2007 13:53:19 -0000 1.51 @@ -20,7 +20,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_gst.cpp,v 1.50 2007/07/01 10:53:48 bjacques Exp $ */ +/* $Id: sound_handler_gst.cpp,v 1.51 2007/07/02 13:53:19 tgc Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -183,8 +183,6 @@ mutex::scoped_lock lock(gstelements->handler->_mutex); - guint8* data_pos = gstelements->get_data_ptr(gstelements->position); - // First callback if (GST_BUFFER_SIZE(buffer) == 0) { if (gstelements->data_size > BUFFER_SIZE) { @@ -210,6 +208,8 @@ return; } + guint8* data_pos = gstelements->get_data_ptr(gstelements->position); + // Last callback - the last re-fill if (gstelements->position+BUFFER_SIZE > gstelements->data_size) { Index: backend/sound_handler_sdl.cpp =================================================================== RCS file: /sources/gnash/gnash/backend/sound_handler_sdl.cpp,v retrieving revision 1.71 retrieving revision 1.72 diff -u -b -r1.71 -r1.72 --- backend/sound_handler_sdl.cpp 1 Jul 2007 10:53:49 -0000 1.71 +++ backend/sound_handler_sdl.cpp 2 Jul 2007 13:53:19 -0000 1.72 @@ -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.71 2007/07/01 10:53:49 bjacques Exp $ +// $Id: sound_handler_sdl.cpp,v 1.72 2007/07/02 13:53:19 tgc Exp $ #ifdef HAVE_CONFIG_H #include "config.h" @@ -684,7 +684,7 @@ // call NetStream or Sound audio callbacks if (handler->m_aux_streamer.size() > 0) { - Uint8* buf = new Uint8[buffer_length]; + uint8_t* buf = new uint8_t[buffer_length]; // Loop through the attached sounds hash_wrapper< void*, gnash::sound_handler::aux_streamer_ptr >::iterator it = handler->m_aux_streamer.begin(); @@ -776,7 +776,7 @@ long bytes_decoded = 0; - while (outsize == 0) { + while (outsize == 0 && sound->position < sound->data_size) { uint8_t* frame; int framesize; @@ -929,7 +929,7 @@ } else { mix_length = decoded_size; } - + if (sound->raw_data_size < 2) continue; // something went terrible wrong do_mixing(stream+index, sound, sound->get_raw_data_ptr(0), mix_length, sounddata->volume); // When the current sound has enough decoded data to fill @@ -975,8 +975,8 @@ handler->soundsPlaying--; } - } - } + } // active sounds loop + } // existing sounds loop } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit