... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.
Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
... This includes failure paths in the initialization if import. Those
resources would have been reclaimed before program exit, but not as soon as
they should have been.
... This also includes certain leaks that would happen every time a file is
successfully imported or exported. We never used avformat_free_context or
av_dict_free as we should have!
... There were also AVPacket objects repeatedly reinitialized without proper
cleanups in between. That might have leaked memory too.
I could see this on windows:
Import a file such as .aiff format, while "Files of type:"
reads "FFmpeg-compatible files".
Leave Audacity running.
Attempt to delete the file in Windows Exploerer.
Get a message from Windows that the file is in use by Audacity and cannot be
deleted.
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls. Mostly useful as documentation of design intent.
Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
When the avutil_version and avcodec_version symbols are not found, fall back to
guess the filenames of avutil and avcodec (as done in r13195 and previously).
The non-monolithic libavformat is linked against libavcodec and libavutil.
Instead of (falsely) guessing the filenames of libavcodec and libavutil, get the
files that the libavformat library is linked against. This fixes wrong filename
guesses and avoids run-time issues by using incompatible libavcodec/libavutil
version with libavformat.
av_frame_alloc/av_frame_free are defined in avutil, but the deprecated
alternative functions avcodec_alloc_frame/avcodec_free_frame are defined in
avcodec instead. FFMPEG_INITALT needs to be enhanced to support different
library names.
avcodec_free_frame can't be directly replaced by av_free for older libav/FFmpeg
versions, because avcodec_free_frame takes a pointer to a pointer (**frame), but
av_free takes only a pointer (*frame).
The preprocessor definition FFMPEG_VERSION cannot be used to determine whether
the libav* header are provided by the FFmpeg or libav project. Therefore an own
proprocessor definition is needed to make the differentiatiion.
IS_FFMPEG_PROJECT should be set by configure instead of hard-coding it in
FFmpeg.h.
Some parameters of libav functions have no 'const' flag in contrast to their
FFmpeg counterparts. Assume that the headers come from FFmpeg if FFMPEG_VERSION
is defined. Otherwise assume that the headers come from libav.
Use avcodec_alloc_frame/avcodec_free_frame for older FFmpeg/libav versions
that do not have av_frame_alloc/av_frame_free (when compiling with
--disable-dynamic-loading).
This still depends on internal API
And is missing planar Audio support, so not all formats work
also the fixed size audio buffer has to be removed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Benjamin Drung <bdrung@debian.org>