CVSROOT: /sources/gnash Module name: gnash Changes by: Benjamin Wolsey <bwy> 07/12/14 09:37:10
Modified files: . : ChangeLog server/asobj : SoundFfmpeg.cpp Log message: server/asobj/SoundFfmpeg.cpp: fix a segfault in getPosition() when no audio stream is found. Not even sure why this is called in that case, but the code should be dead anyway... CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5169&r2=1.5170 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/SoundFfmpeg.cpp?cvsroot=gnash&r1=1.19&r2=1.20 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5169 retrieving revision 1.5170 diff -u -b -r1.5169 -r1.5170 --- ChangeLog 14 Dec 2007 05:57:46 -0000 1.5169 +++ ChangeLog 14 Dec 2007 09:37:09 -0000 1.5170 @@ -1,3 +1,8 @@ +2007-12-14 Benjamin Wolsey <[EMAIL PROTECTED]> + + * server/asobj/SoundFfmpeg.cpp: fix a segfault in getPosition() + when no audio stream is found. + 2007-12-14 Zou Lunkai <[EMAIL PROTECTED]> * testsuite/misc-ming.all/runtime_vm_stack_test.c, Makefile.am: Index: server/asobj/SoundFfmpeg.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/SoundFfmpeg.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -b -r1.19 -r1.20 --- server/asobj/SoundFfmpeg.cpp 12 Dec 2007 10:23:46 -0000 1.19 +++ server/asobj/SoundFfmpeg.cpp 14 Dec 2007 09:37:09 -0000 1.20 @@ -498,10 +498,13 @@ } // Return the position in the file in milliseconds - if (formatCtx && audioIndex) { + if (formatCtx && audioIndex >= 0) + { double time = (double)formatCtx->streams[audioIndex]->time_base.num / formatCtx->streams[audioIndex]->time_base.den * (double)formatCtx->streams[audioIndex]->cur_dts; return static_cast<unsigned int>(time * 1000); - } else { + } + else + { return 0; } } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit