Doesn't change the logic, instead of exiting in each of the two
branches below, just exit before.
---
 fftools/textformat/tf_mermaid.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/fftools/textformat/tf_mermaid.c b/fftools/textformat/tf_mermaid.c
index 59b11811f1..dbe489a7a7 100644
--- a/fftools/textformat/tf_mermaid.c
+++ b/fftools/textformat/tf_mermaid.c
@@ -579,15 +579,11 @@ static void mermaid_print_value(AVTextFormatContext *tfc, 
const char *key,
         exit = 1;
     }
 
-    //if (exit)
-    //    return;
+    if (exit)
+        return;
 
     if ((section->flags & (AV_TEXTFORMAT_SECTION_FLAG_IS_SHAPE | 
AV_TEXTFORMAT_SECTION_PRINT_TAGS))
         || (section->flags & AV_TEXTFORMAT_SECTION_FLAG_IS_SUBGRAPH && 
sec_data.subgraph_start_incomplete)) {
-
-        if (exit)
-            return;
-
         switch (mmc->diagram_config->diagram_type) {
         case AV_DIAGRAMTYPE_GRAPH:
 
@@ -630,10 +626,6 @@ static void mermaid_print_value(AVTextFormatContext *tfc, 
const char *key,
         }
 
     } else if (section->flags & AV_TEXTFORMAT_SECTION_FLAG_HAS_LINKS) {
-
-        if (exit)
-            return;
-
         if (buf->len > 0)
             av_bprintf(buf, "%s", "<br>");
 
-- 
2.39.5 (Apple Git-154)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to