GNOME Bugzilla – Bug 773720
directsoundsrc: incorrect cast of WinAPI function argument
Last modified: 2016-10-31 14:08:28 UTC
Created attachment 338830 [details] [review] Cast first arg of mixerGetDevCaps to UINT_PTR gst_directsound_src_mixer_find calls mixerGetDevCaps casting first parameter to uint by using GPOINTER_TO_UINT. But the first parameter of mixerGetDevCaps is actually UINT_PTR (see MSDN), which is 8 bytes long on 64-bit platform. Such invalid usage causes read access violation inside of winmm.dll. Attached a patch which casts the first argument to UINT_PTR.
commit bd2fcc957110e2954e1311c7db584be5c5b74b23 Author: Artem Martynovich <artem.martynovich@gmail.com> Date: Mon Oct 31 19:26:31 2016 +0600 directsoundsrc: Correctly cast mixer to uintptr https://bugzilla.gnome.org/show_bug.cgi?id=773720