[SCM] GNU Shockwave Flash (SWF) player branch, master, updated. debian/0.8.11_git20130903-2-2-g366d396

Gabriele Giacone gg0-guest at alioth.debian.org
Tue Sep 10 00:01:47 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Shockwave Flash (SWF) player".

The branch, master has been updated
       via  366d396b857c360a8b3f53f59e03e164bd9ddff7 (commit)
       via  8fb4383a134f8cdf343feac4ef3f3b8f41f6fdb1 (commit)
      from  71bba7720b1ea67e91923f394bef0c550168184e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 366d396b857c360a8b3f53f59e03e164bd9ddff7
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date:   Tue Sep 10 00:25:04 2013 +0200

    Add patch to fix ffmpeg memory leak.

commit 8fb4383a134f8cdf343feac4ef3f3b8f41f6fdb1
Author: Gabriele Giacone <1o5g4r8o at gmail.com>
Date:   Sat Sep 7 20:05:24 2013 +0200

    Enable jemalloc on kfreebsd-*.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog               |    8 ++++
 debian/control                 |    2 +-
 debian/patches/02ffmpegmemleak |   79 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/series          |    1 +
 debian/rules                   |    2 +-
 5 files changed, 90 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9b29db0..2bdd4a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+gnash (0.8.11~git20130903-3) unstable; urgency=low
+
+  * Fix memory leak introduced by recent audio resampling changes in ffmpeg
+    media handler (Closes: #575089).
+  * Enable jemalloc on kfreebsd-*.
+
+ -- Gabriele Giacone <1o5g4r8o at gmail.com>  Tue, 10 Sep 2013 00:23:04 +0200
+
 gnash (0.8.11~git20130903-2) unstable; urgency=low
 
   * B-D on libjemalloc-dev on linux-any only.
diff --git a/debian/control b/debian/control
index 09c2a0d..a07d0c1 100644
--- a/debian/control
+++ b/debian/control
@@ -35,7 +35,7 @@ Build-Depends: autoconf,
                libgstreamer0.10-dev | gstreamer0.10-dev,
                libgtk2.0-dev,
                libjpeg-dev,
-               libjemalloc-dev [linux-any],
+               libjemalloc-dev [!hurd-i386],
                libltdl-dev,
                libmysqlclient-dev,
                libpango1.0-dev | pango-dev,
diff --git a/debian/patches/02ffmpegmemleak b/debian/patches/02ffmpegmemleak
new file mode 100644
index 0000000..5490208
--- /dev/null
+++ b/debian/patches/02ffmpegmemleak
@@ -0,0 +1,79 @@
+Description: Fix memory leak introduced by recent audio resampling changes in
+ ffmpeg media handler.
+Author: Sandro Santilli <strk at keybit.net>
+Origin: upstream, http://git.savannah.gnu.org/gitweb/?p=gnash.git;a=commitdiff;h=db62681
+Origin: upstream, http://git.savannah.gnu.org/gitweb/?p=gnash.git;a=commitdiff;h=6e68759
+Origin: upstream, http://git.savannah.gnu.org/gitweb/?p=gnash.git;a=commitdiff;h=1f28d72
+Bug: https://savannah.gnu.org/bugs/index.php?39987
+Bug-Debian: http://bugs.debian.org/575089#92
+
+--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
++++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+@@ -27,6 +27,7 @@
+ #include "FLVParser.h"
+ #include "SoundInfo.h"
+ #include "MediaParser.h" // for AudioInfo
++#include "GnashScopedPtr.h"
+ 
+ //#define GNASH_DEBUG_AUDIO_DECODING
+ 
+@@ -498,13 +499,16 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
+     size_t outSize = MAX_AUDIO_FRAME_SIZE;
+ 
+     // TODO: make this a private member, to reuse (see NetStreamFfmpeg in 0.8.3)
+-    boost::int16_t* outPtr = reinterpret_cast<boost::int16_t*>(av_malloc(outSize));
+-    if (!outPtr) {
++    ScopedPtr<boost::int16_t> output( reinterpret_cast<boost::int16_t*>(av_malloc(outSize)), av_free );
++    if (!output.get()) {
+         log_error(_("failed to allocate audio buffer."));
+         outputSize = 0;
+         return NULL;
+     }
+ 
++    boost::int16_t* outPtr = output.get();
++
++
+ #ifdef GNASH_DEBUG_AUDIO_DECODING
+     log_debug("AudioDecoderFfmpeg: about to decode %d bytes; "
+         "ctx->channels:%d, ctx->frame_size:%d",
+@@ -517,12 +521,12 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
+     av_init_packet(&pkt);
+     pkt.data = const_cast<uint8_t*>(input);
+     pkt.size = inputSize;
+-    AVFrame *frm = avcodec_alloc_frame();
+-    if (!frm) {
++    ScopedPtr<AVFrame> frm ( avcodec_alloc_frame(), av_free );
++    if (!frm.get()) {
+         log_error(_("failed to allocate frame."));
+         return NULL;
+     }
+-    int tmp = avcodec_decode_audio4(_audioCodecCtx, frm, &got_frm, &pkt);
++    int tmp = avcodec_decode_audio4(_audioCodecCtx, frm.get(), &got_frm, &pkt);
+ 
+ #ifdef GNASH_DEBUG_AUDIO_DECODING
+     const char* fmtname = av_get_sample_fmt_name(_audioCodecCtx->sample_fmt);
+@@ -569,7 +573,6 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
+                 "data."), outputSize, inputSize);
+         log_error(_("Upgrading ffmpeg/libavcodec might fix this issue."));
+         outputSize = 0;
+-        av_freep(&frm);
+         return NULL;
+     }
+ 
+@@ -612,8 +615,6 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
+         log_debug("resampler returned %d samples ", outSamples);
+ #endif
+ 
+-        av_freep(&frm);
+-
+         if (expectedMaxOutSamples < outSamples) {
+             log_error(_(" --- Computation of resampled samples (%d) < then the actual returned samples (%d)"),
+                 expectedMaxOutSamples, outSamples);
+@@ -641,7 +642,6 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t* input,
+         boost::uint8_t* newOutput = new boost::uint8_t[outSize];
+         std::memcpy(newOutput, outPtr, outSize);
+         outPtr = reinterpret_cast<boost::int16_t*>(newOutput);
+-        av_freep(&frm);
+     }
+ 
+     outputSize = outSize;
diff --git a/debian/patches/series b/debian/patches/series
index acd1b61..d68e34c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 00sensible
 01spellingerror
+02ffmpegmemleak
diff --git a/debian/rules b/debian/rules
index b17a433..5e30d25 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,7 +49,7 @@ CONFIGURE_FLAGS = \
 		--with-plugins-install=system \
 		--enable-shared=yes
 
-ifneq (,$(filter kfreebsd-% hurd-%,$(DEB_BUILD_ARCH)))
+ifneq (,$(filter hurd-%,$(DEB_BUILD_ARCH)))
 	CONFIGURE_FLAGS += --disable-jemalloc
 endif
 


hooks/post-receive
-- 
GNU Shockwave Flash (SWF) player



More information about the pkg-flash-devel mailing list