[FFmpeg-devel] [PATCH 0/3] Make avio_enum_protocols const correct

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Wed Aug 21 12:04:35 EEST 2019


Hello,

this goal of this patchset is making avio_enum_protocols const correct.
It currently ignores the distinction between const URLProtocol *
const * and const URLProtocol ** in the line p = p ? p + 1 : url_protocols;
(where p is of the latter type and url_protocols is of the former (after
the array-to-pointer conversion has taken place)). As a consequence, the
users of this function will have pointers to non-const pointing to
something that is actually const. 
Fixing this requires changing the function's signature and this will
only be possible at the next major version bump.
Given that the FF_API defines are not part of the public API and
following Carl-Eugen's lead in constifying the AVOutputFormat pointer I
did not change show_protocols in fftools/cmdutils.c (this function
contains all the callers of avio_enum_protocols in FFmpeg).
Also included are two patches found via running FATE with the major
version bumped locally. ([1] has also been found that way.)

- Andreas

[1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2019-August/248144.html

Andreas Rheinhardt (3):
  lavformat: Prepare to make avio_enum_protocols const correct
  fate: Don't use depreceated keepside option
  avformat/wtvdec: Forward errors when reading packet

 libavformat/avio.h      | 4 ++++
 libavformat/protocols.c | 6 +++++-
 libavformat/version.h   | 3 +++
 libavformat/wtvdec.c    | 5 ++---
 tests/fate-run.sh       | 4 ++--
 5 files changed, 16 insertions(+), 6 deletions(-)

-- 
2.21.0



More information about the ffmpeg-devel mailing list