https://bugs.winehq.org/show_bug.cgi?id=41290
Bug ID: 41290 Summary: DirectShow applications: MP3 playback is broken if winegstreamer is disabled Product: Wine Version: 1.9.18 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: quartz Assignee: wine-bugs@winehq.org Reporter: kakurasan@gmail.com CC: 00cpxxx@gmail.com Regression SHA1: d4fd43c97117c9135f5b032e2cc8c899b4b91de5 Distribution: ---
Created attachment 55609 --> https://bugs.winehq.org/attachment.cgi?id=55609 A small test program that uses DirectShow
MP3 playback is broken (sound disappears immediately or no sound at all) if winegstreamer is disabled. Builtin quartz displays "err:quartz:ACMWrapper_Receive Cannot prepare header 512" error messages.
Workaround: Use native quartz.dll (not msacm32.dll)
----- Result of regression testing ----- d4fd43c97117c9135f5b032e2cc8c899b4b91de5 is the first bad commit commit d4fd43c97117c9135f5b032e2cc8c899b4b91de5 Author: Bruno Jesus 00cpxxx@gmail.com Date: Sun Aug 28 04:07:29 2016 -0300
msacm32: Handle invalid source length in acmStreamPrepareHeader.
Signed-off-by: Bruno Jesus 00cpxxx@gmail.com Signed-off-by: Andrew Eikum aeikum@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
:040000 040000 ad164588c7e145723fabce89540bbea2c3acd0ed 72e8f6ce0cbc6c2473b158230d0a2f7c1540d789 M dlls
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com --- Hi, thanks for the report. Unfortunately I could not reproduce this, I do see a "err:quartz:ACMWrapper_Receive Cannot prepare header 512" but sound plays fine when winegstreamer is disabled.
Anyway it seems like quartz is abusing the API by not setting some fields before calling acmStreamPrepareHeader. I'll take a look.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- The problem is that nBlockAlign is 193 and cbSrcLength is 192, so there is less data than a block so it returns an error. This off by one happens because quartz/mpegsplit.c always add +1 to nBlockAlign apparently related to padding, which is fixed for some reason instead of checking if the MP3 really has padding.
The patch introduced a check that seems to affect mp3 headers negatively, I'll have to dig further.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #3 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 55612 --> https://bugs.winehq.org/attachment.cgi?id=55612 test patch
Can you please try this patch?
https://bugs.winehq.org/show_bug.cgi?id=41290
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #4 from kakurasan@gmail.com --- The patch works (sound plays) fine. Thanks.
https://bugs.winehq.org/show_bug.cgi?id=41290
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Keywords| |patch Status|UNCONFIRMED |NEW
--- Comment #5 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to kakurasan from comment #4)
The patch works (sound plays) fine. Thanks.
Thanks for testing, I believe the patch is correct but I'll spend some more time on tests before sending a final version to fix this issue.
https://bugs.winehq.org/show_bug.cgi?id=41290
Kol kol@MV8660.spb.edu changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kol@MV8660.spb.edu
--- Comment #6 from Kol kol@MV8660.spb.edu --- Perhaps, this bug affects also TES3:Morrowind and Nehrim. Nehrim is a modification of TES4:Oblivion but the original game is not affected. Other games such as TES5:Skyrim, Crysis 1, Dragon Age 2 are not affected.
TES3 plays choppy sound in menu and hangs when the saved game is loading. Nehrim plays normal sound in menu but also hangs when the saved game is loading. Both games show a lot of "err:quartz:ACMWrapper_Receive Cannot prepare header 512" messages. The bug is present only for built-in quartz.dll and the patch from Comment#3 does not help.
The bug disappears if the problem patch to msacm32.dll is reverted.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #7 from Kol kol@MV8660.spb.edu --- This is still an issue for TES3:Morrowind and Nehrim (but not for original TES4:Oblivion) with Wine 1.9.21-Staging and built-in quartz.dll. Both games freeze when the saved game is loading. The patch from Comment#3 still does not help. If the problem commit to msacm32.dll is reverted, the bug disappears.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #8 from Bruno Jesus 00cpxxx@gmail.com --- I will be back home by the end of the month. Then I will take a look at this.
https://bugs.winehq.org/show_bug.cgi?id=41290
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |89d4e14c0a87cae4b2a92013db7 | |f7890f075f30f Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #9 from Bruno Jesus 00cpxxx@gmail.com --- Fixed by http://source.winehq.org/git/wine.git/?a=commit;h=89d4e14c0a87cae4b2a92013db...
https://bugs.winehq.org/show_bug.cgi?id=41290
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.24.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #11 from Kol kol@MV8660.spb.edu --- With pure Wine 1.9.24 (and Wine 1.9.23 with both variants of the patch from Comments#3 and #9) the situation is the same as described in Comments #6 and #7: games freeze when the saved game is loading and print megabytes of messages "err:quartz:ACMWrapper_Receive Cannot prepare header 512". Winegstreamer is disabled, "quartz.dll" is set to built-in.
Sound works fine in games other than TES3:Morrowind and Nehrim. Perhaps, the bug is caused by specific MP3 files.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #12 from Bruno Jesus 00cpxxx@gmail.com --- I have Morrowind, I'll take a look. Thanks for the reminder on this issue.
https://bugs.winehq.org/show_bug.cgi?id=41290
Rosanne DiMesio dimesio@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |emailofchris@gmail.com
--- Comment #13 from Rosanne DiMesio dimesio@earthlink.net --- *** Bug 41952 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=41290
Rosanne DiMesio dimesio@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |REOPENED Resolution|FIXED |---
--- Comment #14 from Rosanne DiMesio dimesio@earthlink.net --- Reopening based on duplicate bug 41952. I can reproduce the problem in 2.0-rc4 with Oblivion and winegstreamer disabled.
https://bugs.winehq.org/show_bug.cgi?id=41290
Jayk Hunter jaykisonfire@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jaykisonfire@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #15 from Kol kol@MV8660.spb.edu --- Nothing changed with Wine versions from 1.9.24 to 2.0-rc4. And my mistake: original TES4:Oblivion is also affected when the in-game music is enabled. With WINEDEBUG="err+quartz,fixme+quartz,warn+quartz" the related lines of the output are
fixme:quartz:MPEGSplitter_QueryInterface No interface for {37d84f60-42cb-11ce-8135-0 0aa004bb851}! fixme:strmbase:TransformFilterImpl_QueryInterface No interface for {37d84f60-42cb-11 ce-8135-00aa004bb851}!fixme:quartz:DSoundRender_QueryInterface No interface for {37d 84f60-42cb-11ce-8135-00aa004bb851}! fixme:quartz:MPEGSplitter_QueryInterface No interface for {2dd74950-a890-11d1-abe8-0 0a0c905f375}! fixme:quartz:MPEGSplitter_QueryInterface No interface for {2dd74950-a890-11d1-abe8-0 0a0c905f375}! fixme:quartz:MPEGSplitter_QueryInterface No interface for {56a868b3-0ad4-11ce-b03a-0 020af0ba770}! fixme:strmbase:TransformFilterImpl_QueryInterface No interface for {56a868b3-0ad4-11 ce-b03a-0020af0ba770}!fixme:quartz:Parser_OutputPin_QueryInterface No interface for {56a868a5-0ad4-11ce-b03a-0020af0ba770}! warn:quartz:DSoundRender_GetWritePos Delta too big 66/0, too far ahead warn:quartz:DSoundRender_GetWritePos Advancing 11664 bytes fixme:quartz:Parser_OutputPin_QueryInterface No interface for {56a868a5-0ad4-11ce-b0 3a-0020af0ba770}! warn:quartz:DSoundRender_GetWritePos Delta too big -26/25, overwriting old data or e ven skipping warn:quartz:DSoundRender_GetWritePos Advancing 16272 bytes fixme:quartz:Parser_OutputPin_QueryInterface No interface for {56a868a5-0ad4-11ce-b0 3a-0020af0ba770}! (repeated many times)
and after that thousands of err:quartz:ACMWrapper_Receive Cannot prepare header 512. The game freezes when the saved game is loading.
Reverting the problem commit to msacm32.dll still fixes the bug. In the debug output "err:quartz:ACMWrapper_Receive Cannot prepare header 512" are absent but the new lines appear
err:quartz:ACMWrapper_Receive Error sending sample (80040227) warn:quartz:MPEGSplitter_process_sample Failed with hres: 80040227! warn:quartz:FileAsyncReader_WaitForNext Called without samples in queue and not flus hing!! fixme:quartz:FileAsyncReader_WaitForNext Returned: 258 (00000000)
and the game works fine. Winegstreamer is always disabled.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #16 from Bruno Jesus 00cpxxx@gmail.com --- The patch made 2 different problems surface. One was fixed, I'm working in the other one.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #17 from Bruno Jesus 00cpxxx@gmail.com --- Should be fixed by http://source.winehq.org/git/wine.git/?a=commit;h=0afcefd338f1c220ed0a175a3a...
Please retest if possible.
https://bugs.winehq.org/show_bug.cgi?id=41290
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1|89d4e14c0a87cae4b2a92013db7 |0afcefd338f1c220ed0a175a3a8 |f7890f075f30f |8fe7a5af596ae Status|REOPENED |RESOLVED Resolution|--- |FIXED
--- Comment #18 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Bruno Jesus from comment #17)
Should be fixed by http://source.winehq.org/git/wine.git/?a=commit; h=0afcefd338f1c220ed0a175a3a88fe7a5af596ae
Please retest if possible.
I'm able to reproduce this with Morrowind intro song prior to the patch, after the patch the music plays fine.
If there is still a problem please open a new bug as this bug was already used for 2 different issues.
https://bugs.winehq.org/show_bug.cgi?id=41290
--- Comment #19 from Kol kol@MV8660.spb.edu --- I can confirm that the bug is absent in TES3:Morrowind and TES4:Oblivion under Wine 2.0-rc5 with the patch from this commit. Sounds and music are heard correctly also in other games.
https://bugs.winehq.org/show_bug.cgi?id=41290
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #20 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.0-rc6.