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.h backend...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog backend/sound_handler.h backend...
Date: Wed, 26 Sep 2007 10:15:53 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/09/26 10:15:53

Modified files:
        .              : ChangeLog 
        backend        : sound_handler.h sound_handler_gst.cpp 
        server/swf     : tag_loaders.cpp 

Log message:
                * backend/sound_handler.h (create_sound): document meaning of a 
NULL
                  data.
                * backend/sound_handler_gst.cpp (create_sound): don't choke on 
NULL
                  data.
                * server/swf/tag_loaders.cpp (sound_stream_head_loader): mek 
the call
                  to create_sound() with NO data easier to read.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4417&r2=1.4418
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler.h?cvsroot=gnash&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&r1=1.64&r2=1.65
http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.142&r2=1.143

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4417
retrieving revision 1.4418
diff -u -b -r1.4417 -r1.4418
--- ChangeLog   26 Sep 2007 09:28:26 -0000      1.4417
+++ ChangeLog   26 Sep 2007 10:15:50 -0000      1.4418
@@ -1,5 +1,14 @@
 2007-09-26 Sandro Santilli <address@hidden>
 
+       * backend/sound_handler.h (create_sound): document meaning of a NULL
+         data.
+       * backend/sound_handler_gst.cpp (create_sound): don't choke on NULL
+         data.
+       * server/swf/tag_loaders.cpp (sound_stream_head_loader): mek the call
+         to create_sound() with NO data easier to read.
+
+2007-09-26 Sandro Santilli <address@hidden>
+
        * backend/sound_handler.h: add assign() and constructor taking
          a memory buffer to the Buffer class.
 

Index: backend/sound_handler.h
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- backend/sound_handler.h     26 Sep 2007 09:28:27 -0000      1.30
+++ backend/sound_handler.h     26 Sep 2007 10:15:52 -0000      1.31
@@ -18,7 +18,7 @@
 // 
 //
 
-/* $Id: sound_handler.h,v 1.30 2007/09/26 09:28:27 strk Exp $ */
+/* $Id: sound_handler.h,v 1.31 2007/09/26 10:15:52 strk Exp $ */
 
 /// \page sound_handler_intro Sound handler introduction
 ///
@@ -235,8 +235,8 @@
        //
        /// @param data
        ///     The data to be stored. For soundstream this is NULL.
-       ///     If not NULL, the data is currently *copied*
-       ///     TODO: avoid the copy, if possible, getting ownership 
transferred instead
+       ///     If not NULL, ownership of the data is transferred.
+       ///     The data is assumed to have been allocated using new[].
        ///
        /// @param data_bytes
        /// The size of the data to be stored. For soundstream this is 0.

Index: backend/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- backend/sound_handler_gst.cpp       26 Sep 2007 07:09:02 -0000      1.64
+++ backend/sound_handler_gst.cpp       26 Sep 2007 10:15:52 -0000      1.65
@@ -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.64 2007/09/26 07:09:02 strk Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.65 2007/09/26 10:15:52 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -94,12 +94,12 @@
        switch (sounddata->soundinfo->getFormat())
        {
        case FORMAT_NATIVE16:
-               sounddata->append(data, data_bytes);
+               if ( data ) sounddata->append(data, data_bytes);
                break;
 
        case FORMAT_MP3:
        //case FORMAT_VORBIS:
-               sounddata->append(data, data_bytes);
+               if ( data ) sounddata->append(data, data_bytes);
                break;
 
        case FORMAT_RAW:

Index: server/swf/tag_loaders.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -b -r1.142 -r1.143
--- server/swf/tag_loaders.cpp  25 Sep 2007 18:58:43 -0000      1.142
+++ server/swf/tag_loaders.cpp  26 Sep 2007 10:15:52 -0000      1.143
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: tag_loaders.cpp,v 1.142 2007/09/25 18:58:43 strk Exp $ */
+/* $Id: tag_loaders.cpp,v 1.143 2007/09/26 10:15:52 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1619,9 +1619,6 @@
 
    // Wot about reading the sample_count samples?
 
-    // Ask sound_handler it to init this sound.
-    int        data_bytes = 0;
-
     if (! (sample_rate >= 0 && sample_rate <= 3))
     {
        IF_VERBOSE_MALFORMED_SWF(
@@ -1653,7 +1650,7 @@
 
        // Stores the sounddata in the soundhandler, and the ID returned
        // can be used to starting, stopping and deleting that sound
-       int     handler_id = handler->create_sound(NULL, data_bytes, sinfo);
+       int     handler_id = handler->create_sound(NULL, 0, sinfo);
 
     m->set_loading_sound_stream_id(handler_id);
 }




reply via email to

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