Hi Marvin, > -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-boun...@ffmpeg.org> On Behalf Of > Marvin Scholz > Sent: Mittwoch, 11. Juni 2025 21:57 > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH 1/4] fftools/textformat: fix writing > integers for mermaid > > With the previous logic, the integer writing codepath was > unreachable. > > Fix CID 1646948 > --- > fftools/textformat/tf_mermaid.c | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > > diff --git a/fftools/textformat/tf_mermaid.c > b/fftools/textformat/tf_mermaid.c > index d3b9131ada..59b11811f1 100644 > --- a/fftools/textformat/tf_mermaid.c > +++ b/fftools/textformat/tf_mermaid.c > @@ -604,22 +604,20 @@ static void > mermaid_print_value(AVTextFormatContext *tfc, const char *key, > > break; > case AV_DIAGRAMTYPE_ENTITYRELATIONSHIP: > - > - if (!is_int && str) > {
This is actually intended. The reason is that Mermaid ER diagrams do not allow number values for column and data type names while for AV_DIAGRAMTYPE_GRAPH, it's not a problem. Also, column names must not be NULL. Still, you are right that there's unreachable code, which is the first branch of this if-block. if (is_int) writer_printf(tfc, " %s %"PRId64" %s\n", key, num, col_type); else writer_printf(tfc, " %s %s %s\n", key, str, col_type); That first part can be removed, only the 2nd is needed. Thanks sw _______________________________________________ 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".