[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [bug #39987] gnash crashes after ~5 mins by playing yt vi
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [bug #39987] gnash crashes after ~5 mins by playing yt videos with ffmpeg handler |
Date: |
Mon, 09 Sep 2013 13:03:39 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 |
Follow-up Comment #2, bug #39987 (project gnash):
Commit 514d488671aa3c987910fb93001defcc60a37528 is the likely culprit for the
leak.
In that commit the variable "output", used to keep track of that needed to be
freed, was removed.
See:
--- a/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
+++ b/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp
@@ -497,24 +497,16 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t*
input,
assert(inputSize);
- const size_t bufsize = MAX_AUDIO_FRAME_SIZE;
+ size_t outSize = MAX_AUDIO_FRAME_SIZE;
// TODO: make this a private member, to reuse (see NetStreamFfmpeg in
0.8.3)
- boost::uint8_t* output;
-
- output = reinterpret_cast<boost::uint8_t*>(av_malloc(bufsize));
- if (!output) {
+ boost::int16_t* outPtr =
reinterpret_cast<boost::int16_t*>(av_malloc(outSize));
+ if (!outPtr) {
log_error(_("failed to allocate audio buffer."));
outputSize = 0;
return NULL;
}
- boost::int16_t* outPtr = reinterpret_cast<boost::int16_t*>(output);
-
- // We initialize output size to the full size
- // then decoding will eventually reduce it
- int outSize = bufsize;
-
and
@@ -577,7 +572,6 @@ AudioDecoderFfmpeg::decodeFrame(const boost::uint8_t*
input,
log_error(_("Upgrading ffmpeg/libavcodec might fix this issue."));
outputSize = 0;
av_freep(&frm);
- av_free(output);
return NULL;
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39987>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/