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 440997 - [gstriff] Doesn't handle width!=depth files with audio/x-raw-int properly
[gstriff] Doesn't handle width!=depth files with audio/x-raw-int properly
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.13
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2007-05-24 17:45 UTC by Sebastian Dröge (slomo)
Modified: 2007-05-31 17:10 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch to fix the problem (882 bytes, patch)
2007-05-28 15:33 UTC, Wim Taymans
none Details | Review
width-depth.diff (2.67 KB, patch)
2007-05-31 15:20 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2007-05-24 17:45:44 UTC
in current CVS wavparse and wavenc don't handle audio/x-raw-int files with width!=depth correctly.

Our own representation of such samples has the lowest $depth bits set while wav expects the highest $depth bits to be set. So every sample should be shifted by "width-depth" to the left before writing/after reading.

Comment 1 Sebastian Dröge (slomo) 2007-05-24 17:48:03 UTC

contains a sample file. For wavenc just try to open a file with width!=depth in audacity :)
Comment 2 Wim Taymans 2007-05-28 15:33:55 UTC
Created attachment 88943 [details] [review]
Patch to fix the problem

ignore the size field, samples are just stored with the least significant bits cleared.
Comment 3 Sebastian Dröge (slomo) 2007-05-30 18:16:32 UTC
That's only for the wavparse part though but should work fine :)

wavenc would still need some special handling. I'll try to find some time for it in the next days...
Comment 4 Sebastian Dröge (slomo) 2007-05-31 08:50:55 UTC
Ok, let's reassign this to plugins-base and mark as blocker for the release. This should be committed IMHO as width!=depth is a new feature this release and it is currently broken...
Comment 5 Sebastian Dröge (slomo) 2007-05-31 15:20:43 UTC
Created attachment 89106 [details] [review]

Ok, here's the same patch with the change in both places to also work with extended wave files.

Would be nice if someone committed this ;)
Comment 6 Jan Schmidt 2007-05-31 17:10:43 UTC
Committed without the FIXMEs, because there's no need to fix this later:

2007-05-31  Jan Schmidt  <>

        * gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
        In riff, the depth is stored in the size field but it just means that
        the least significant bits are cleared. We can therefore just play
        the sample as if it had a depth == width. Fixes: #440997

        Patch by: Wim Taymans <>
        Patch by: Sebastian Dröge  <>