[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [bug #45887] `gnash --audio-dump` produces corrupted WAV
From: |
Nutchanon Wetchasit |
Subject: |
[Gnash-commit] [bug #45887] `gnash --audio-dump` produces corrupted WAV file |
Date: |
Sun, 06 Sep 2015 11:27:41 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20100101 Firefox/10.0.12 Iceweasel/10.0.12 |
Follow-up Comment #2, bug #45887 (project gnash):
Looking at the `chime_gnash0.8.11dev-dc51f53.wav` under hex editor reveals
following RIFF structure:
(@nnn means offset from file's beginning, numbers are in decimal unless
prefixed with `0x`)
RIFF "WAVE" (address@hidden, payload address@hidden, payload size 40)
+- fmt (address@hidden, address@hidden, payload size 16)
|
+- data (address@hidden, address@hidden, payload size 0)
|
+- *(address@hidden, address@hidden, payload size 0xFFFFFFFF)
.
(Audio data goes here...)
* Last chunk is invalid (invalid name, and chunk size exceeded main RIFF
chunk).
This shows two problems:
1. Gnash pre-filled `data` chunk size as `0` and filled
`RIFF` chunk's size accordingly, before writing out the audio data.
But when it is about to terminate, it didn't come back to update
the corresponding size fields of `data` and `RIFF` chunk.
2. Gnash put an invalid chunk in the output file. (Not sure if this is
a placeholder for audio data or something)
So when other programs tried to read the dump file, it either interpret
that this is an empty WAV file (0 byte in `data` chunk), or this is a
corrupted WAVE file (due to an invalid chunk of mystery, or garbage that
followed the RIFF chunk).
Side note: following is minimal RIFF structure of a _valid_ empty WAVE file
RIFF "WAVE" (address@hidden, payload address@hidden, payload size 32)
+- fmt (address@hidden, address@hidden, payload size 16)
|
+- data (address@hidden, address@hidden, payload size 0)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45887>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/