bugGnash - The GNU Flash player - Bugs: bug #30993, Audio file RIFF/WAVE/chunk headers...

 
 

bug #30993: Audio file RIFF/WAVE/chunk headers invalid on x86_64

Submitted by:  Tommy Lacroix <tlacroix>
Submitted on:  Tue 07 Sep 2010 11:04:54 PM UTC  
 
Category: sound-sdlSeverity: 3 - Normal
Release: trunkStatus: Fixed
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 08 Sep 2010 04:53:06 PM UTC, comment #4:

Committed. Thank you.

http://git.savannah.gnu.org/cgit/gnash.git/commit/?id=b3d5da01fbf3a4b3d3bc0fee14ddd87f994811d5

/me wonders if savannah git supports automatic redirect of commit ids...

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 08 Sep 2010 01:39:04 AM UTC, comment #3:

Your patch works fine. Tested on CentOS 5.4 in i686 (32bit) and x86_64 (64bit). Thanks!

Tommy Lacroix <tlacroix>
Tue 07 Sep 2010 11:42:45 PM UTC, comment #2:

correct this time.

(file #21412)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 07 Sep 2010 11:20:20 PM UTC, comment #1:

Please try the attached patch, using exact size integer types provided by boost.

(file #21411)

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 07 Sep 2010 11:04:54 PM UTC, original submission:

I stumbled upon a tiny bug with the audio dumps on 64bit platforms. Specifically, the wave file header that gets written is invalid and the results in the file being non-processable by all software.

I digged into the SDL sound handler (it may affect other sounds handlers too, but I didn't test them), and it appears that what should be 32bit values in the file and chunk headers are defined as "long int" in the structs. Everything is fine on a 32bit platform, as long integers are 32bit long, but problems arise on a 64bit platform as they are 64bit long.

The patch file attached (against a trunk snapshot sent to us by Benjamin on 2010-08-30) is quite simple. It only modifies the struct of the wave file and chunk headers so that the 32bit values are unsigned integers rather than long integers, thus always 4 bytes long and resulting in a valid RIFF/WAVE file and chunk header on 32bit and 64bit platforms.

Tommy Lacroix <tlacroix>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #21410:  gnash-fix-SDL-64bit.patch added by tlacroix (1KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by strk (Updated the item)
  • -unavailable- added by tlacroix (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 08 Sep 2010 04:53:06 PM UTCstrkStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 07 Sep 2010 11:42:45 PM UTCstrkAttached File-=>Added gnash-SDL-WAV_HDR_bits2.patch, #21412
    Tue 07 Sep 2010 11:20:20 PM UTCstrkAttached File-=>Added gnash-SDL-WAV_HDR_bits.patch, #21411
      Assigned toNone=>strk
    Tue 07 Sep 2010 11:04:54 PM UTCtlacroixAttached File-=>Added gnash-fix-SDL-64bit.patch, #21410

    Back to the top


    Powered by Savane 3.1-cleanup1