[FFmpeg-devel] [RFC] Windows issues with av_destruct_packet_nofree

Måns Rullgård mans
Wed Feb 18 18:32:33 CET 2009

Art Clarke <aclarke at xuggle.com> writes:

> Hi folks,
> 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.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list