CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/12/11 10:06:01
Modified files: . : ChangeLog server/swf : tag_loaders.cpp Log message: Tolerate lack of a 'latency' field in MP3 stream. Fixes bug #21729. Note that Ming also reports the file to have the same problem so it may actually be malformed. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5127&r2=1.5128 http://cvs.savannah.gnu.org/viewcvs/gnash/server/swf/tag_loaders.cpp?cvsroot=gnash&r1=1.162&r2=1.163 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5127 retrieving revision 1.5128 diff -u -b -r1.5127 -r1.5128 --- ChangeLog 11 Dec 2007 09:10:24 -0000 1.5127 +++ ChangeLog 11 Dec 2007 10:06:00 -0000 1.5128 @@ -1,5 +1,9 @@ 2007-12-11 Sandro Santilli <[EMAIL PROTECTED]> + * server/swf/tag_loaders.cpp (sound_stream_head_loader): tolerate + lack of a 'latency' field in MP3 stream. Fixes bug #21729. + Note that Ming also reports the file to have the same problem + so it may actually be malformed. * server/parser/shape_character_def.cpp (read): still read an additional byte even if fill and line bits are zero if we're reading a morph shape. Index: server/swf/tag_loaders.cpp =================================================================== RCS file: /sources/gnash/gnash/server/swf/tag_loaders.cpp,v retrieving revision 1.162 retrieving revision 1.163 diff -u -b -r1.162 -r1.163 --- server/swf/tag_loaders.cpp 6 Dec 2007 13:23:35 -0000 1.162 +++ server/swf/tag_loaders.cpp 11 Dec 2007 10:06:01 -0000 1.163 @@ -17,7 +17,7 @@ // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // -/* $Id: tag_loaders.cpp,v 1.162 2007/12/06 13:23:35 bwy Exp $ */ +/* $Id: tag_loaders.cpp,v 1.163 2007/12/11 10:06:01 strk Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1252,11 +1252,25 @@ // 2 bytes here unsigned int sampleCount = in->read_u16(); + if ( ! sampleCount ) + { + log_error("No samples advertised for sound stream"); + } + int latency = 0; if (format == media::AUDIO_CODEC_MP3) { + try + { in->ensureBytes(2); latency = in->read_s16(); // UNUSED !! + } + catch (ParserException& ex) + { + // See https://savannah.gnu.org/bugs/?21729 for an example + // triggering this. + log_swferror("MP3 sound stream lacks a 'latency' field"); + } //garbage = in->read_uint(16); } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit