[Bug 49074] New: Nintendulator 0.980 - AVI capture fails due to error in AVIStreamWrite

WineHQ Bugzilla wine-bugs at winehq.org
Fri May 1 20:11:47 CDT 2020


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 at winehq.org
          Reporter: quietust at 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/fc91a2abcbe3ad37a1a6e52f12d8436d3b2a5f80/src/AVI.cpp
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.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list