After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 100582 - wavparse plugin doesn't support big endian machines
wavparse plugin doesn't support big endian machines
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.4.2
Other Linux
: Normal major
: 0.4.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-12-07 03:32 UTC by Jon Nall
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to correctly parse wav headers for big endian machines (4.29 KB, patch)
2002-12-07 19:12 UTC, Jon Nall
none Details | Review
changed to use G_BIG_ENDIAN and fixed unsigned data problem (4.77 KB, patch)
2002-12-07 20:15 UTC, Jon Nall
none Details | Review
an 8-bit unsigned wav i used for testing (26.43 KB, application/octet-stream)
2002-12-07 20:17 UTC, Jon Nall
  Details
fix to use G*_FROM_LE (3.75 KB, patch)
2002-12-07 21:22 UTC, Jon Nall
none Details | Review
there's also bad code in gst-libs/gst/riff/riffutils.c. this fixes that file. (719 bytes, patch)
2002-12-08 21:28 UTC, Jon Nall
none Details | Review

Description Jon Nall 2002-12-07 03:32:20 UTC
the wavparse plugin in the gst-plugins component doesn't work on big endian
machines. i looked at the source, and there's a lot of pointer arithmetic
going on that's only valid for little endian machines. so this plugin is
absolutely worthless for PPC/Sparc boxes.

i'll be glad to provide more info if desired.
Comment 1 Christian Fredrik Kalager Schaller 2002-12-07 16:12:38 UTC
A patch would be even better than more info :). Anyway we have some
PPC developers on GStreamer so hopefully I can get them to look into
this if 
you can't make us a patch.
Comment 2 Jon Nall 2002-12-07 19:12:30 UTC
Created attachment 12823 [details] [review]
patch to correctly parse wav headers for big endian machines
Comment 3 Jon Nall 2002-12-07 19:12:50 UTC
a patch you want, a patch you got!

i used the define __BIG_ENDIAN__ to qualify stuff. i know this works
on gcc-3.2.1. i'm not sure about others (figuring that out in
configure is probably the correct solution). 

this was my first cut at something. it seems to work.

i've also "fixed" the "signed" parameter in caps, however it looks
like osssink doesn't support unsigned data.

enjoy.
Comment 4 Jon Nall 2002-12-07 20:15:28 UTC
Created attachment 12825 [details] [review]
changed to use G_BIG_ENDIAN and fixed unsigned data problem
Comment 5 Jon Nall 2002-12-07 20:17:32 UTC
Created attachment 12826 [details]
an 8-bit unsigned wav i used for testing
Comment 6 Jon Nall 2002-12-07 21:22:07 UTC
Created attachment 12828 [details] [review]
fix to use G*_FROM_LE
Comment 7 Christian Fredrik Kalager Schaller 2002-12-08 12:29:59 UTC
Ok Jon, patch applied and commited to CVS and you added to the credits
section in the release notes. Thanks :)
Comment 8 Jon Nall 2002-12-08 21:28:52 UTC
Created attachment 12854 [details] [review]
there's also bad code in gst-libs/gst/riff/riffutils.c. this fixes that file.
Comment 9 Jon Nall 2002-12-08 21:29:20 UTC
reopening due to addition patch that needs to be applied.
Comment 10 Christian Fredrik Kalager Schaller 2002-12-12 11:43:54 UTC
ok, this last patch also commited, thanks Jon