Previously gpac wrongly detected some < 0.7 ffmpeg versions as >= 0.7
which lead to compile errors because ByteIOContext had not yet been
renamed to AVIOContext.
I tracked down the commit which made this API change in ffmepg:
------------------------------------------------------------------------
commit ae628ec1fd7f54c102bf9e667a3edd404b9b9128
Author: Anton Khirnov <anton@khirnov.net>
Date: Sun Feb 20 11:04:12 2011 +0100
avio: rename ByteIOContext to AVIOContext.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
------------------------------------------------------------------------
At this point avcodec.h reported the following:
#define LIBAVCODEC_VERSION_MAJOR 52
#define LIBAVCODEC_VERSION_MINOR 113
#define LIBAVCODEC_VERSION_MICRO 1
Therefor this patch causes gpac compiled against libavcodec versions <
52.113.1 to set USE_PRE_0_7. Previously this flag was only set for
libavcodec versions < 52.102.0.
I think I was also able to track down the origin of this mistake. The
ffmpeg doc/APIchanges document contains this:
------------------------------------------------------------------------
2011-02-20 - e731b8d - lavf 52.102.0 - avio.h
* e731b8d - rename init_put_byte() to ffio_init_context(), deprecating the
original, and move it to a private header so it is no longer
part of our public API. Instead, use av_alloc_put_byte().
* ae628ec - rename ByteIOContext to AVIOContext.
------------------------------------------------------------------------
Note: The 52.102.0 version reference in that note refers to libavfilter,
not libavocdec which is used by gpac to make the feature detection.
Last but not least: Calling this flag USE_PRE_0_7 might not be the best
choice, instead it may be better to have individual flags for the
individual API changes ffmpeg went through. That being said, I may be
the only one who cares about this for now, and I have verified that this
new version also makes sense for the other places where USE_PRE_0_7 is
used, so this should be sufficient.