[FFmpeg-devel] [PATCH 03/10] fftools: drop useless indirection

Anton Khirnov anton at khirnov.net
Tue Mar 15 11:05:25 EET 2022


---
 fftools/cmdutils.c | 4 ++--
 fftools/cmdutils.h | 2 --
 fftools/ffmpeg.c   | 4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 4b50e15eef..0ac98852fe 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1961,7 +1961,7 @@ static void show_help_filter(const char *name)
     count = avfilter_filter_pad_count(f, 0);
     for (i = 0; i < count; i++) {
         printf("       #%d: %s (%s)\n", i, avfilter_pad_get_name(f->inputs, i),
-               media_type_string(avfilter_pad_get_type(f->inputs, i)));
+               av_get_media_type_string(avfilter_pad_get_type(f->inputs, i)));
     }
     if (f->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)
         printf("        dynamic (depending on the options)\n");
@@ -1972,7 +1972,7 @@ static void show_help_filter(const char *name)
     count = avfilter_filter_pad_count(f, 1);
     for (i = 0; i < count; i++) {
         printf("       #%d: %s (%s)\n", i, avfilter_pad_get_name(f->outputs, i),
-               media_type_string(avfilter_pad_get_type(f->outputs, i)));
+               av_get_media_type_string(avfilter_pad_get_type(f->outputs, i)));
     }
     if (f->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS)
         printf("        dynamic (depending on the options)\n");
diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index f460cb028e..57db531f5c 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -633,8 +633,6 @@ void *grow_array(void *array, int elem_size, int *size, int new_size);
  */
 void *allocate_array_elem(void *array, size_t elem_size, int *nb_elems);
 
-#define media_type_string av_get_media_type_string
-
 #define GROW_ARRAY(array, nb_elems)\
     array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)
 
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 9a3fdc636d..eaca897aec 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1606,7 +1606,7 @@ static void print_final_stats(int64_t total_size)
             total_packets += ist->nb_packets;
 
             av_log(NULL, AV_LOG_VERBOSE, "  Input stream #%d:%d (%s): ",
-                   i, j, media_type_string(type));
+                   i, j, av_get_media_type_string(type));
             av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" packets read (%"PRIu64" bytes); ",
                    ist->nb_packets, ist->data_size);
 
@@ -1640,7 +1640,7 @@ static void print_final_stats(int64_t total_size)
             total_packets += ost->packets_written;
 
             av_log(NULL, AV_LOG_VERBOSE, "  Output stream #%d:%d (%s): ",
-                   i, j, media_type_string(type));
+                   i, j, av_get_media_type_string(type));
             if (ost->encoding_needed) {
                 av_log(NULL, AV_LOG_VERBOSE, "%"PRIu64" frames encoded",
                        ost->frames_encoded);
-- 
2.34.1



More information about the ffmpeg-devel mailing list