[FFmpeg-cvslog] lavu/tx: print debug info even if no transforms are found

Lynne git at videolan.org
Fri Jan 28 09:28:39 EET 2022


ffmpeg | branch: master | Lynne <dev at lynne.ee> | Fri Jan 28 08:08:58 2022 +0100| [95f02e43e16f0fa2bb4c390da77718ee614f40dd] | committer: Lynne

lavu/tx: print debug info even if no transforms are found

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

 libavutil/tx.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/libavutil/tx.c b/libavutil/tx.c
index 06e8958283..a299408ed4 100644
--- a/libavutil/tx.c
+++ b/libavutil/tx.c
@@ -543,13 +543,6 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
         }
     }
 
-    /* No matches found */
-    if (!nb_cd_matches)
-        return AVERROR(ENOSYS);
-
-    /* Sort the list */
-    AV_QSORT(cd_matches, nb_cd_matches, TXCodeletMatch, cmp_matches);
-
     /* Print debugging info */
     av_bprint_init(&bp, 0, AV_BPRINT_SIZE_AUTOMATIC);
     av_bprintf(&bp, "For transform of length %i, %s, ", len,
@@ -557,7 +550,16 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type,
     print_type(&bp, type);
     av_bprintf(&bp, ", ");
     print_flags(&bp, flags);
-    av_bprintf(&bp, ", found %i matches:", nb_cd_matches);
+    av_bprintf(&bp, ", found %i matches%s", nb_cd_matches,
+               nb_cd_matches ? ":" : ".");
+
+    /* No matches found */
+    if (!nb_cd_matches)
+        return AVERROR(ENOSYS);
+
+    /* Sort the list */
+    AV_QSORT(cd_matches, nb_cd_matches, TXCodeletMatch, cmp_matches);
+
     av_log(NULL, AV_LOG_VERBOSE, "%s\n", bp.str);
 
     for (int i = 0; i < nb_cd_matches; i++) {



More information about the ffmpeg-cvslog mailing list