[FFmpeg-devel] [PATCH 1/3] lavfi/formats: cosmetic: move negotiation stuff at the end

Nicolas George george at nsup.org
Thu Aug 19 18:30:55 EEST 2021


It was between AVFilterFormats and AVFilterChannelLayouts.

Signed-off-by: Nicolas George <george at nsup.org>
---
 libavfilter/formats.h | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)


The last commit is the one I sent earlier, just rebased on top of this
cosmetic change because it makes no sense to add almost a hundred lines
of documentation just to move it in the next commit.

Since these three patches are cosmetic and internal documentation, I
will push soon, probably as soon as I have something new to post on top
of them.

But please comment nonetheless.

Anton and Michael: you are the authors of the redundant similarity
logics in swap and pick_formats() (see the FIXME comments in the third
patche), I would appreciate if you had a look at it.

Michael, in particular, if you have test cases covering this logic that
are not part of FATE, please share them, or even better make them part
of FATE if possible.


diff --git a/libavfilter/formats.h b/libavfilter/formats.h
index ed513c265a..a9cfa14e95 100644
--- a/libavfilter/formats.h
+++ b/libavfilter/formats.h
@@ -69,21 +69,6 @@ struct AVFilterFormats {
     struct AVFilterFormats ***refs; ///< references to this list
 };
 
-typedef struct AVFilterFormatMerger {
-    unsigned offset;
-    int (*merge)(void *a, void *b);
-    int (*can_merge)(const void *a, const void *b);
-} AVFilterFormatsMerger;
-
-typedef struct AVFilterNegotiation {
-    unsigned nb;
-    const AVFilterFormatsMerger *mergers;
-    const char *conversion_filter;
-    unsigned conversion_opts_offset;
-} AVFilterNegotiation;
-
-const AVFilterNegotiation *ff_filter_get_negotiation(AVFilterLink *link);
-
 /**
  * A list of supported channel layouts.
  *
@@ -330,4 +315,19 @@ int ff_formats_check_sample_rates(void *log, const AVFilterFormats *fmts);
  */
 int ff_formats_check_channel_layouts(void *log, const AVFilterChannelLayouts *fmts);
 
+typedef struct AVFilterFormatMerger {
+    unsigned offset;
+    int (*merge)(void *a, void *b);
+    int (*can_merge)(const void *a, const void *b);
+} AVFilterFormatsMerger;
+
+typedef struct AVFilterNegotiation {
+    unsigned nb;
+    const AVFilterFormatsMerger *mergers;
+    const char *conversion_filter;
+    unsigned conversion_opts_offset;
+} AVFilterNegotiation;
+
+const AVFilterNegotiation *ff_filter_get_negotiation(AVFilterLink *link);
+
 #endif /* AVFILTER_FORMATS_H */
-- 
2.32.0



More information about the ffmpeg-devel mailing list