MSACM: winemp3 codec crashes on seek, (no longer) reimplement with libmad?

Alex Villací­s Lasso a_villacis at
Thu Feb 9 13:24:37 CST 2006

Alex Villací­s Lasso wrote:
> Eric Pouech wrote:
>> Alex Villací­s Lasso wrote:
>>> Eric Pouech wrote:
>>>> > Are there any issues
>>>>> I should take into account before trying this?
>>>> first of all, are we sure that the issue comes from the decoder 
>>>> itself (and not some wine wrapper around it) ?
>>> I performed the following test: with the sample VB application, I 
>>> modified the winemp3 code to write the input buffer (mp3) and the 
>>> decoded output buffer (PCM) at the end of separate files. Then I 
>>> played the mp3 samples file. This one plays correctly (rules out 
>>> mangling of input buffers). The output file has quirks, but plays a 
>>> little better than the output from the VB application (no delays), 
>>> which suggest that there are some timing issues with the winemp3 
>>> code, or that the output duration, as reported by winemp3, is 
>>> slightly incorrect.
>> or simply, that the sequence of:
>> - getting mp3 encoded data
>> - pushing them to the decoder for decoding
>> - pushing the decoded data to the speaker
>> runs slower than the expected pace...
>> which doesn't blame only step2, or the decoder itself. for example, 
>> putting the decoder in a separate thread would greatly improve, or 
>> using smaller packets in step 1.
> I also ran tests with a different movie which uses the Indeo codecs 
> (native) for decoding. This one runs smoothly (with audio AND video). 
> In my opinion, this is additional evidence that the winemp3 codec is 
> at fault (especially since my sample movie uses a not-installed DivX 
> video codec which therefore does not consume any CPU, as it is running 
> in audio-only mode). The native Indeo codec also does not crash on seek.
> On a side note, is there anybody in the list with experience with 
> GStreamer programming? The base GStreamer framework is LGPL, so it 
> *might* be legally possible to write a GStreamer wrapper for wine. Of 
> course, there might be an architecture difference that makes this 
> impossible, so any feedback will be appreciated.
> Alex Villacís Lasso
Some more tests. I downloaded the latest version of mpglib, and compared 
it against the wine fork. Aside from extra spaces and an one-time-only 
initialization in the wine code, the current mpglib code is almost 
identical to the wine fork. However, the standalone mpglib decodes the 
extracted samples correctly. This means that there is something about 
the Wine environment that disturbs mpglib enough so that decoding no 
longer works correctly. I also noticed that mpglib uses malloc() and 
free() from glibc even inside the wine copy (one malloc()/free() pair 
per sample block to be decoded). Could this be causing some interference 
(especially since the wine architecture decodes in a separate thread)? 
Maybe it is worth it to use HeapAlloc()/HeapFree() instead.

Alex Villacís Lasso

More information about the wine-devel mailing list