From 811f625623e8f53436b7d1a83dd0492a2774f72f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 4 Jul 2022 18:03:12 +0200 Subject: [PATCH] transcode debug should not print (null) array termination --- gtk2_ardour/transcode_ffmpeg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/transcode_ffmpeg.cc b/gtk2_ardour/transcode_ffmpeg.cc index c4e6625bc2..ca0a1db3d9 100644 --- a/gtk2_ardour/transcode_ffmpeg.cc +++ b/gtk2_ardour/transcode_ffmpeg.cc @@ -452,7 +452,7 @@ TranscodeFfmpeg::extract_audio (std::string outfile, ARDOUR::samplecnt_t /*sampl if (debug_enable) { printf ("EXTRACT AUDIO:\n"); - for (int i = 0; i < 14; ++i) { + for (int i = 0; i < 14 && argp[i]; ++i) { printf ("%s ", argp[i]); } printf ("\n"); @@ -524,7 +524,7 @@ TranscodeFfmpeg::transcode (std::string outfile, const int outw, const int outh, if (debug_enable) { printf ("TRANSCODE VIDEO:\n"); - for (int i = 0; i < 15; ++i) { + for (int i = 0; i < 15 && argp[i]; ++i) { printf ("%s ", argp[i]); } printf ("\n");