[FFmpeg-devel] [RFC] Windows issues with av_destruct_packet_nofree
Wed Feb 18 18:38:32 CET 2009
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...
More information about the ffmpeg-devel