gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM


From: Nutchanon Wetchasit
Subject: [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object
Date: Sun, 13 Sep 2015 13:17:45 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:25.5) Gecko/20150606 Firefox/31.9 PaleMoon/25.5.0

Follow-up Comment #19, bug #45722 (project gnash):

I have observed around `AudioDecoderSimple` for bits relating to GStreamer
`pcmplay-stereo-8bit.swf` case, which have normal sound at first, then
followed by either gibberish or crash. Excerpt from diagnostic output:

DEBUG: AudioDecoderSimple: initialized flash codec 3 (Uncompressed)
DEBUG:   decoding 65536 bytes (offset 0, remaining 88200, total 88200)
DEBUG:   decoded to 262144 bytes, used 65536 bytes from source
DEBUG:   decoding 22664 bytes (offset 65536, remaining 22664, total 88200)
DEBUG:   decoded to 90656 bytes, used 22664 bytes from source


An anomaly could be seen in the first "decoded..." line: diagnostic code
reported that 65536 bytes audio get expanded to 262144 bytes, which was
four times of original.

In this case, 2 byte/frame simply got converted to 4 byte/frame should expand
*only for two times, not four times*.

This could be traced to `libmedia/AudioDecoderSimple.cpp` line 393
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/AudioDecoderSimple.cpp?id=f5016cc9399c9ffd3c5d32c67bb28fac285559c6#n393>
The code errneously set output size to four times of input size if the sound
is stereo, even when itself is responsible only for 8-bit to 16-bit
conversion,
which always multiplies two. (Note: stereo expansion, when applicable,
is done in later stage
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/AudioDecoderSimple.cpp?id=f5016cc9399c9ffd3c5d32c67bb28fac285559c6#n461>
and will re-adjust the buffer size
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/AudioDecoderSimple.cpp?id=f5016cc9399c9ffd3c5d32c67bb28fac285559c6#n465>
again automatically)

When this happens, after outputting the normal sound, SDL output stage tries
to read beyond the audio buffer (due to erroneous buffer size),
leading to gibberish output (or crash).

Gnash: 0.8.11dev (git f5016cc 9-Sep-2015 with
`show-sound-decoding-diagnostic.patch`)
SDL: libsdl1.2debian 1.2.15-5 (debian) 
GStreamer: libgstreamer0.10-0 0.10.36-1.2 (debian)
CSound: libcsound64-5.2 1:5.17.11~dfsg-3 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45722>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]