CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/07/24 20:53:02
Modified files: . : ChangeLog server/asobj : SoundFfmpeg.h Log message: * server/asobj/SoundFfmpeg.h: Provide a constructor for proper initialization of members. YOU CAN NOT ASSUME POINTERS WILL BE INITIALIZED TO NULL. Fixes bug #20578. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3814&r2=1.3815 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/SoundFfmpeg.h?cvsroot=gnash&r1=1.8&r2=1.9 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3814 retrieving revision 1.3815 diff -u -b -r1.3814 -r1.3815 --- ChangeLog 24 Jul 2007 19:57:10 -0000 1.3814 +++ ChangeLog 24 Jul 2007 20:53:01 -0000 1.3815 @@ -1,5 +1,12 @@ 2007-07-24 Sandro Santilli <[EMAIL PROTECTED]> + * server/asobj/SoundFfmpeg.h: Provide a constructor + for proper initialization of members. + YOU CAN NOT ASSUME POINTERS WILL BE INITIALIZED TO NULL. + Fixes bug #20578. + +2007-07-24 Sandro Santilli <[EMAIL PROTECTED]> + * server/text.cpp (display_glyph_records): don't render invalid glyphs as empty boxes, unless a DRAW_INVALID_GLYPHS_AS_EMPTY_BOXES macro is defined. Index: server/asobj/SoundFfmpeg.h =================================================================== RCS file: /sources/gnash/gnash/server/asobj/SoundFfmpeg.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- server/asobj/SoundFfmpeg.h 17 Jul 2007 22:05:03 -0000 1.8 +++ server/asobj/SoundFfmpeg.h 24 Jul 2007 20:53:02 -0000 1.9 @@ -44,6 +44,24 @@ class SoundFfmpeg : public Sound { public: + SoundFfmpeg() + : // REMEMBER TO ALWAYS INITIALIZE ALL MEMBERS ! + audioCodecCtx(NULL), + audioStream(NULL), + formatCtx(NULL), + audioFrame(NULL), + resampleCtx(NULL), + setupThread(NULL), + lock(NULL), + inputPos(0), + ByteIOCxt(), // ? + audioIndex(-1), + leftOverData(NULL), + leftOverSize(0), + isAttached(false), + remainingLoops(0) + {} + ~SoundFfmpeg(); void loadSound(std::string file, bool streaming); @@ -72,6 +90,8 @@ boost::thread *setupThread; boost::mutex setupMutex; + + // TODO: it makes NO SENSE for a scoped_lock to be allocated on the heap ! boost::mutex::scoped_lock *lock; long inputPos; _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit