[FFmpeg-devel] [RFC] Windows issues with av_destruct_packet_nofree
Wed Feb 18 18:48:16 CET 2009
On 2/18/2009 9:45 AM, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
>> On Wed, Feb 18, 2009 at 05:32:33PM +0000, M?ns Rullg?rd wrote:
>>> Art Clarke <aclarke at xuggle.com> writes:
>>>> I just spent somewhere between 2-3 weeks tracking down a weird bug that
>>>> resulted in our code creating corrupted files on Windows but working fine on
>>>> Linux and Mac. The issue, it turns out, affects people who allocate their
>>>> own AVPackets, and then try to use av_interleaved_write_frame on Windows.
>>>> That's because on Windows, "av_destruct_packet_nofree" outside of the libav
>>>> DLL's themselves is NOT the same as "av_destruct_packet_nofree" inside the
>>>> libav DLLs. As a result when using av_interleaved_write_frame on Windows,
>>>> packet you might think FFMPEG is copying, aren't actually duplicated and
>>>> memory corruption results.
>>> For the record, such behaviour with respect to comparing function
>>> addresses is in violation of the C standard.
>> Nevertheless workarounds were already discussed, I thought we mostly
>> agreed the current code is ugly - I forgot what happened then though...
> Yes, I remember the discussions. The symptom that time was memory
> leaks when using bitstream filters with shared libs.
I confirm, the problem is caused by the use of bsymbolic
However it is difficult to fix it without breaking API last time I
tried, maybe I overlooked though.
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel