GNOME Bugzilla – Bug 711699
wavenc: bogus header generated
Last modified: 2013-11-09 10:22:45 UTC
Before commit db29522a430e44450415ca3676abd1b77ee923d9 the encoder used to generate a WAVE header with a bogus size and on EOS rewrite it appropriately (IIUC). After that commit the wave.data.len attribute value is zero in gst_wavenc_create_header_buf() instead of... 0x7FFF0000 in the previous state of the element. That seems to have bad side effects on the webkit WebAudio playback pipeline. The wavenc element used there errors out. I can't yet reproduce that issue outside of WebKit though... But I thought I'd open a bug anyway, even if it ends up closed INVALID :)
Created attachment 259287 [details] [review] proposed patch
Review of attachment 259287 [details] [review]: ::: gst/wavenc/gstwavenc.c @@ +896,3 @@ wavenc->rate = 0; wavenc->audio_length = 0; + wavenc->meta_length = 0x7FFF0000; I think you want to initialize audio_length here. But also it has to be reset to 0 after pushing the initial header because later it is only incremented (same as meta_length, both only get += buffer_size).
Created attachment 259313 [details] [review] updated patch
Created attachment 259314 [details] [review] patch now with comments :)
commit 0ee332378bb7c869bd80dad3cdbe6c7464f182a3 Author: Philippe Normand <philn@igalia.com> Date: Fri Nov 8 17:59:24 2013 +0100 wavenc: generate a non-empty data header Restore the behavior of the element to the state before commit db29522a430e44450415ca3676abd1b77ee923d9. A non-empty header is generated and when the EOS event is received the header is generated again, this time with the correct size. https://bugzilla.gnome.org/show_bug.cgi?id=711699