[FFmpeg-cvslog] fftools/ffmpeg: drop undocumented runtime debug-setting

Anton Khirnov git at videolan.org
Tue May 2 12:31:04 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Apr 20 09:36:03 2023 +0200| [38c937e8c48608fd1574729365aa991b189138cb] | committer: Anton Khirnov

fftools/ffmpeg: drop undocumented runtime debug-setting

This feature is of highly questionable usefulness and - as the comment
in the code says - is not actually supported by the API.

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

 fftools/ffmpeg.c | 35 -----------------------------------
 1 file changed, 35 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 1ae2c5c18f..453d3763be 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1768,40 +1768,6 @@ static int check_keyboard_interaction(int64_t cur_time)
                    "only %d given in string '%s'\n", n, buf);
         }
     }
-    if (key == 'd' || key == 'D'){
-        int debug=0;
-        if(key == 'D') {
-            InputStream *ist = ist_iter(NULL);
-
-            if (ist)
-                debug = ist->dec_ctx->debug << 1;
-
-            if(!debug) debug = 1;
-            while (debug & FF_DEBUG_DCT_COEFF) //unsupported, would just crash
-                debug += debug;
-        }else{
-            char buf[32];
-            int k = 0;
-            i = 0;
-            set_tty_echo(1);
-            while ((k = read_key()) != '\n' && k != '\r' && i < sizeof(buf)-1)
-                if (k > 0)
-                    buf[i++] = k;
-            buf[i] = 0;
-            set_tty_echo(0);
-            fprintf(stderr, "\n");
-            if (k <= 0 || sscanf(buf, "%d", &debug)!=1)
-                fprintf(stderr,"error parsing debug value\n");
-        }
-        for (InputStream *ist = ist_iter(NULL); ist; ist = ist_iter(ist))
-            ist->dec_ctx->debug = debug;
-        for (OutputStream *ost = ost_iter(NULL); ost; ost = ost_iter(ost)) {
-            if (ost->enc_ctx)
-                ost->enc_ctx->debug = debug;
-        }
-        if(debug) av_log_set_level(AV_LOG_DEBUG);
-        fprintf(stderr,"debug=%d\n", debug);
-    }
     if (key == '?'){
         fprintf(stderr, "key    function\n"
                         "?      show this help\n"
@@ -1809,7 +1775,6 @@ static int check_keyboard_interaction(int64_t cur_time)
                         "-      decrease verbosity\n"
                         "c      Send command to first matching filter supporting it\n"
                         "C      Send/Queue command to all matching filters\n"
-                        "D      cycle through available debug modes\n"
                         "h      dump packets/hex press to cycle through the 3 states\n"
                         "q      quit\n"
                         "s      Show QP histogram\n"



More information about the ffmpeg-cvslog mailing list