[FFmpeg-devel] [PATCH 1/8] avformat/utils: Remove superfluous headers

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Tue Apr 21 05:31:46 EEST 2020


stdarg.h has been included in 780d7897a9c9295b43f1f0e9b49a11f99cd402c3
for ff_url_join(). This header became unnecessary when this function was
moved into a separate file in df9f22d42b0905385629a9d368bb5a1eef2b45ef.

libavutil/pixdesc.h has been included for av_get_pix_fmt_name() in
603b8bc2a109978c8499b06d2556f1433306eca7 and is unused since commit
2fb7501938b7103624c9bef740ca498258cacdab that removed the stuff belonging
to FF_API_FORMAT_PARAMETERS. Notice that this file still uses
AV_PIX_FMT_NONE and that therefore the header libavutil/pixfmt.h has
been included (this header is included in pixdesc.h as well as also in
libavutil/internal.h which is also included).

libavutil/time_internal.h has been included for gmtime_r() in commit
e7dd97b5d8cd6ea150446591f37a5946e8ab7cfb; it is unused since commit
b72a7b96f84e5f16dd93b60668aecfda99442c71 which basically moved the code
making use of gmtime_r() to libavutil/dict.c to use in
avpriv_dict_set_timestamp().

audiointerleave.h has been added in c26e58e32cf430f060209e0d6088181f4426b3ce
because of ff_interleave_compare_dts() (at that time the muxing code
was not split from utils.c yet); said function became static in commit
101e1f6ff90c3365bfde05469ae26d2ee7f71f3e, making this header redundant.

metadata.h has been mostly included for what now resides in
libavutil/dict.h. The stuff that now resides in metadata.h has only been
used briefly: From commits ed7694d8cf4633da444237f4df7efc48936419d2 to
d60a9f52eb42dc76dea9996c8ba3567ae98a9a04.

riff.h has been added in 45da8124a09d0ac5f9d8174884584c5f80309d0c
because riff.h once contained declarations for (ff_)codec_get_tag().
This was changed in bfe5454cd238b16e7977085f880205229103eccb.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavformat/utils.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2fb2309f68..a36d6738cd 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -19,7 +19,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <stdarg.h>
 #include <stdint.h>
 
 #include "config.h"
@@ -31,26 +30,22 @@
 #include "libavutil/mathematics.h"
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
-#include "libavutil/pixdesc.h"
+#include "libavutil/pixfmt.h"
 #include "libavutil/thread.h"
 #include "libavutil/time.h"
-#include "libavutil/time_internal.h"
 #include "libavutil/timestamp.h"
 
 #include "libavcodec/bytestream.h"
 #include "libavcodec/internal.h"
 #include "libavcodec/raw.h"
 
-#include "audiointerleave.h"
 #include "avformat.h"
 #include "avio_internal.h"
 #include "id3v2.h"
 #include "internal.h"
-#include "metadata.h"
 #if CONFIG_NETWORK
 #include "network.h"
 #endif
-#include "riff.h"
 #include "url.h"
 
 #include "libavutil/ffversion.h"
-- 
2.20.1



More information about the ffmpeg-devel mailing list