https://bugs.winehq.org/show_bug.cgi?id=41833
Bug ID: 41833 Summary: DirectShow applications: Playback doesn't end when playing some MP3 files if winegstreamer is disabled Product: Wine Version: 1.9.24 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: quartz Assignee: wine-bugs@winehq.org Reporter: kakurasan@gmail.com Distribution: ---
When the test program at https://bugs.winehq.org/show_bug.cgi?id=41290 plays "16. Night Sky.mp3" at http://redmine.audacious-media-player.org/issues/628, WaitForCompletion() doesn't return. Built-in quartz.dll displays many "fixme:quartz:parse_header Not a valid header: XX:XX:XX:XX" messages and after this it displays "fixme:quartz:FileAsyncReader_WaitForNext Returned: 258 (00000000)" infinitely.
The MP3 BGM files in "Mystic Star" (http://www.vector.co.jp/soft/dl/win95/game/se509140.html) have the same problem (MP3 BGMs don't loop).
Workaround: Use native quartz.dll
https://bugs.winehq.org/show_bug.cgi?id=41833
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Summary|DirectShow applications: |DirectShow applications: |Playback doesn't end when |Playback doesn't finish |playing some MP3 files if |when playing MP3 files that |winegstreamer is disabled |end in bad data if | |winegstreamer is disabled CC| |aeikum@codeweavers.com URL| |http://ftp.vector.co.jp/66/ | |17/3135/MysticStar.zip
--- Comment #1 from Bruno Jesus 00cpxxx@gmail.com --- I can confirm this issue. Wild guesses follow.
It looks like quartz keeps track of the position the file is now and where it should end. The problem with broken MP3 is that they end before what quartz expect, in this case quartz keeps trying to pump data but it is already past the end of the buffer [2]. Line 204 hits false (there is no else) and it proceeds as if nothing wrong happened and the function will keep returning hr = 0 (good) forever.
A side note: It looks very suspicious to me that the return from WaitForMultipleObjects is compared with the number of samples [2], because in the situation of the bug the function returns WAIT_TIMEOUT.
[1] https://source.winehq.org/source/dlls/quartz/mpegsplit.c#0195 [2] https://source.winehq.org/source/dlls/quartz/filesource.c#1191
https://bugs.winehq.org/show_bug.cgi?id=41833
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- Created attachment 56252 --> https://bugs.winehq.org/attachment.cgi?id=56252 compiled test sample
Easiest way to reproduce is to unpack the game and run playfile-dshow.exe Music\NR_theme9.mp3 which is the shortest music in the game (48 seconds).
https://bugs.winehq.org/show_bug.cgi?id=41833
--- Comment #3 from Andrew Eikum aeikum@codeweavers.com --- (In reply to Bruno Jesus from comment #1)
I can confirm this issue. Wild guesses follow.
It looks like quartz keeps track of the position the file is now and where it should end. The problem with broken MP3 is that they end before what quartz expect, in this case quartz keeps trying to pump data but it is already past the end of the buffer [2]. Line 204 hits false (there is no else) and it proceeds as if nothing wrong happened and the function will keep returning hr = 0 (good) forever.
Good analysis. That code could definitely use better error handling.
A side note: It looks very suspicious to me that the return from WaitForMultipleObjects is compared with the number of samples [2], because in the situation of the bug the function returns WAIT_TIMEOUT.
Yeah, that's definitely broken. More bad error handling, and that code looks like a rats nest to try to de-tangle.
https://bugs.winehq.org/show_bug.cgi?id=41833
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=48292
https://bugs.winehq.org/show_bug.cgi?id=41833
kakurasan@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX
--- Comment #4 from kakurasan@gmail.com --- winegstreamer is needed for MP3 playback since https://source.winehq.org/git/wine.git/commitdiff/40a4c782b7f77534535dfa7bb2..., closing.
https://bugs.winehq.org/show_bug.cgi?id=41833
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Austin English austinenglish@gmail.com --- Closing.