[FFmpeg-cvslog] fftools/ffmpeg: clean up #includes

Anton Khirnov git at videolan.org
Sun Apr 9 16:50:45 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Mar 25 20:02:23 2023 +0100| [2225134e7d4992eecd2be8ced90977877a138e90] | committer: Anton Khirnov

fftools/ffmpeg: clean up #includes

Drop unneeded ctype.h and math.h.
Group all system headers together.
Sort unconditional includes alphabetically.
Group local includes by the library, sort alphabetically.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2225134e7d4992eecd2be8ced90977877a138e90
---

 fftools/ffmpeg.c | 74 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index d2789b6f5b..750ab76693 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -24,14 +24,14 @@
  */
 
 #include "config.h"
-#include <ctype.h>
-#include <string.h>
-#include <math.h>
-#include <stdlib.h>
+
 #include <errno.h>
 #include <limits.h>
 #include <stdatomic.h>
 #include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
 
 #if HAVE_IO_H
 #include <io.h>
@@ -40,34 +40,6 @@
 #include <unistd.h>
 #endif
 
-#include "libavformat/avformat.h"
-#include "libavdevice/avdevice.h"
-#include "libswresample/swresample.h"
-#include "libavutil/opt.h"
-#include "libavutil/channel_layout.h"
-#include "libavutil/parseutils.h"
-#include "libavutil/samplefmt.h"
-#include "libavutil/fifo.h"
-#include "libavutil/hwcontext.h"
-#include "libavutil/intreadwrite.h"
-#include "libavutil/dict.h"
-#include "libavutil/display.h"
-#include "libavutil/mathematics.h"
-#include "libavutil/pixdesc.h"
-#include "libavutil/avstring.h"
-#include "libavutil/libm.h"
-#include "libavutil/imgutils.h"
-#include "libavutil/timestamp.h"
-#include "libavutil/bprint.h"
-#include "libavutil/time.h"
-#include "libavutil/thread.h"
-#include "libavutil/threadmessage.h"
-#include "libavcodec/version.h"
-
-# include "libavfilter/avfilter.h"
-# include "libavfilter/buffersrc.h"
-# include "libavfilter/buffersink.h"
-
 #if HAVE_SYS_RESOURCE_H
 #include <sys/time.h>
 #include <sys/types.h>
@@ -83,7 +55,6 @@
 #include <windows.h>
 #endif
 
-
 #if HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
@@ -97,14 +68,43 @@
 #include <conio.h>
 #endif
 
-#include <time.h>
+#include "libavutil/avassert.h"
+#include "libavutil/avstring.h"
+#include "libavutil/bprint.h"
+#include "libavutil/channel_layout.h"
+#include "libavutil/dict.h"
+#include "libavutil/display.h"
+#include "libavutil/fifo.h"
+#include "libavutil/hwcontext.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/libm.h"
+#include "libavutil/mathematics.h"
+#include "libavutil/opt.h"
+#include "libavutil/parseutils.h"
+#include "libavutil/pixdesc.h"
+#include "libavutil/samplefmt.h"
+#include "libavutil/thread.h"
+#include "libavutil/threadmessage.h"
+#include "libavutil/time.h"
+#include "libavutil/timestamp.h"
+
+#include "libavcodec/version.h"
+
+#include "libavformat/avformat.h"
+
+#include "libavdevice/avdevice.h"
+
+#include "libswresample/swresample.h"
+
+#include "libavfilter/avfilter.h"
+#include "libavfilter/buffersrc.h"
+#include "libavfilter/buffersink.h"
 
-#include "ffmpeg.h"
 #include "cmdutils.h"
+#include "ffmpeg.h"
 #include "sync_queue.h"
 
-#include "libavutil/avassert.h"
-
 const char program_name[] = "ffmpeg";
 const int program_birth_year = 2000;
 



More information about the ffmpeg-cvslog mailing list