[PATCH v2 2/4] winemp3.acm: Disallow operations encoding to MPEG.

Zebediah Figura z.figura12 at gmail.com
Wed Jun 21 10:07:45 CDT 2017


On 06/21/2017 07:18 AM, Andrew Eikum wrote:
> On Tue, Jun 20, 2017 at 06:04:45PM -0500, Zebediah Figura wrote:
>> Looking at this again I don't think there's really any way to test this;
>> that is, there is no function that these "match" the output of.
>> acmStreamConvert() with the QUERY option would be the obvious choice, and is
>> basically the test case relevant to the application in question, but it
>> requires a source format, and I'm not sure we can assume any given source
>> format will work for all/any given MPEG destination format, even if
>> converting to that MPEG format is possible in general. (waveInOpen() doesn't
>> work either, and probably shouldn't be expected to.)
>>
>> The goal of this patch is ultimately that MPEG doesn't show up in the list
>> of formats brought up by acmFormatChoose, because we can't convert to it. If
>> there's a better/more testable way to achieve this, please don't hesitate to
>> suggest.
> 
> What does the application do? My understanding was it used
> cStandardFormats to determine whether an encoding is available, and
> then tried to open the ACM stream with that conversion, which would
> then fail in Wine and cause the problem. Your patch fixed that by
> changing cStandardFormats to 0, so the application never tried to open
> the stream. Is that about right?

Not directly, no. It calls acmFormatChoose, which brings up a 
system-defined dialog box allowing the user to choose from available 
formats to convert to. Then it tries to convert from whatever format it 
has open into whatever format acmFormatChoose returns; if this is MPEG, 
the latter will fail.



More information about the wine-devel mailing list