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 723125 - wavparse: Fails if some broadcast wave format (BWF) tags precede fmt chunk
wavparse: Fails if some broadcast wave format (BWF) tags precede fmt chunk
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.2.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-27 21:41 UTC by Michael Sheldon
Modified: 2014-02-04 16:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to ignore Broadcast Wave Format metadata when searching for fmt tags (1.78 KB, patch)
2014-01-27 21:43 UTC, Michael Sheldon
committed Details | Review

Description Michael Sheldon 2014-01-27 21:41:48 UTC
Currently if a file doesn't contain a fmt tag as the first section in the header wavparse will search for it until it either finds it or comes across an unknown tag. The present implementation is configured to ignore a number of known header sections, however this doesn't include headers from the Broadcast Wave Format (BWF). This can result in wavparse failing to play wave files with additional BWF metadata (if this metadata precedes the fmt section).

This can be reproduced with the attached sample which was produced by a Sound Devices 702 audio recorder. When played via a simple playbin it produces the following output:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstWavParse:wavparse0: Could not determine type of stream.
Additional debug info:
gstwavparse.c(1966): gst_wavparse_stream_headers (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstWavParse:wavparse0:
Invalid WAV header (no fmt at start): iXML
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

The attached patch makes wavparse aware of all the BWF tags and so allows the clip to play correctly.
Comment 1 Michael Sheldon 2014-01-27 21:43:28 UTC
Created attachment 267350 [details] [review]
Patch to ignore Broadcast Wave Format metadata when searching for fmt tags
Comment 2 Michael Sheldon 2014-01-27 21:44:34 UTC
The example wave file is slightly too large to attach, so can be download here instead: http://mikeasoft.com/~mike/1101T049.WAV
Comment 3 Sebastian Dröge (slomo) 2014-01-29 19:17:19 UTC
commit 659939f0f0ff6cd8b75c9f042165a5a4f798dbe9
Author: Mike Sheldon <elleo@gnu.org>
Date:   Fri Jan 24 01:52:08 2014 +0000

    wavparse: Ignore Broadcast Wave Format (BWF) tags when searching for 'fmt' chunk
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723125