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 784755 - directsoundsrc: fails to compile with gcc 7.1.0
directsoundsrc: fails to compile with gcc 7.1.0
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal major
: 1.12.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-07-10 15:16 UTC by Philippe Renon
Modified: 2017-07-11 06:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix compilation error with gcc 7.1.0 (msys2) (1017 bytes, patch)
2017-07-10 15:38 UTC, Philippe Renon
committed Details | Review

Description Philippe Renon 2017-07-10 15:16:53 UTC
Error happens at line 873 when calling memset (pLockedBuffer, 0, dwSizeBuffer);

Compiler complains about pLockedBuffer being NULL when it should not.

The issue comes from a few lines above when calling IDirectSoundCaptureBuffer_Lock. In that call pLockedBuffer is erroneously passed by value when it should be passed by reference.

Could explain https://bugzilla.gnome.org/show_bug.cgi?id=763322
Comment 1 Philippe Renon 2017-07-10 15:38:34 UTC
Created attachment 355278 [details] [review]
fix compilation error with gcc 7.1.0 (msys2)
Comment 2 Philippe Renon 2017-07-10 15:42:19 UTC
Proposed patch fixes the compilation error but plugin was not tested.
Comment 3 Sebastian Dröge (slomo) 2017-07-10 15:46:01 UTC
Comment on attachment 355278 [details] [review]
fix compilation error with gcc 7.1.0 (msys2)

Looks correct. Did you check if there are similar bugs elsewhere (directsoundsink and the Unlock() method)?
Comment 4 Philippe Renon 2017-07-10 16:37:34 UTC
I checked all other calls to _Lock() and _Unlock() in both directsoundsrc and directsoundsink and they look ok.
Comment 5 Sebastian Dröge (slomo) 2017-07-11 06:13:10 UTC
commit db36718ee4c54d4bf2478cbf561f06bb7b84dbcf (HEAD -> master)
Author: Philippe Renon <philippe_renon@yahoo.fr>
Date:   Mon Jul 10 17:35:32 2017 +0200

    directsoundsrc: Properly pass pLockedBuffer by reference when calling IDirectSoundCaptureBuffer_Lock
    
    https://bugzilla.gnome.org/show_bug.cgi?id=784755