https://bugs.winehq.org/show_bug.cgi?id=49074
Bug ID: 49074 Summary: Nintendulator 0.980 - AVI capture fails due to error in AVIStreamWrite Product: Wine Version: 5.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: avifil32 Assignee: wine-bugs@winehq.org Reporter: quietust@gmail.com Distribution: Ubuntu
In Nintendulator 0.980 (a Nintendo Entertainment System emulator), attempting to record to an AVI file fails with AVIERR_UNSUPPORTED from AddAudio::AVIStreamWrite when running in Wine Staging 5.7 on Ubuntu 16.04.6 LTS. The same thing happens in Wine-Devel 5.7.
Given that I am the author of this application, I've been able to track down exactly what's going wrong.
On Windows, the AVIStreamWrite function treats the "lStart" parameter differently depending on the stream type - for a Video stream it expects it to be a frame number (increasing by 1 each time), but for an Audio stream it expects it to be a *sample* number (increasing by "lSamples" each time). In Wine, however, Audio streams expect "lStart" to increase by 1 each time, just like Video streams.
I've built two test versions of my application: one that only works on Windows, and one that only works in Wine. They can be downloaded from the following URL: https://www.qmtpro.com/~nes/misc/nintendulator_winebug.zip (sha1 4eca2a261db3fdaa03cbc92cbee307c56ffffac2)
See https://github.com/quietust/nintendulator/blob/fc91a2abcbe3ad37a1a6e52f12d84... for relevant source code - these test versions have lines 273-280 commented out and have "WineHack" hardcoded (to "false" for the Windows version and "true" for the Wine version) for the check on line 287.
Steps to reproduce: 1. Download and extract the archive linked above 2. Run "nintendulator_windows.exe stars.nes" in Wine 3. Open the "Misc" menu and select "Start AVI Capture" 4. Enter a filename and press Save 5. Set the Compressor to "Full Frames (Uncompressed)" and press OK 6. Press F2 to start emulation and observe that it fails. 7. Repeat steps 2-6 with "nintendulator_wine.exe" and observe that it now works correctly. 8. Repeat steps 2-7 on Windows and observe that the results are the other way around.
https://bugs.winehq.org/show_bug.cgi?id=49074
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest@gmail.com
--- Comment #1 from Vijay Kamuju infyquest@gmail.com --- Created attachment 67049 --> https://bugs.winehq.org/attachment.cgi?id=67049 patch
https://bugs.winehq.org/show_bug.cgi?id=49074
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |fgouget@codeweavers.com