diff mbox series

[FFmpeg-devel,1/1] fftools/ffmpeg: Output log message when interactive q command is received

Message ID MN2PR04MB59813CA43544EFD7469586E0BAB79@MN2PR04MB5981.namprd04.prod.outlook.com
State Accepted
Commit ce47ce079ae0e1f60ccca3d614181a4ba05cc2e2
Headers show
Series [FFmpeg-devel,1/1] fftools/ffmpeg: Output log message when interactive q command is received | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Soft Works Oct. 13, 2021, 8:34 a.m. UTC
When viewing logs, it's sometimes useful to be able to see whether
execution was ended via q command.

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 fftools/ffmpeg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Michael Koch Oct. 13, 2021, 9 a.m. UTC | #1
Are those keys listed somewhere in the documentation?
Gyan Doshi Oct. 13, 2021, 10:07 a.m. UTC | #2
On 2021-10-13 02:30 pm, Michael Koch wrote:
> Are those keys listed somewhere in the documentation?

Not yet. Press ? to get a list at runtime.

Regards,
Gyan
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 7545b7c68e..d141f34df9 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -3991,8 +3991,10 @@  static int check_keyboard_interaction(int64_t cur_time)
         last_time = cur_time;
     }else
         key = -1;
-    if (key == 'q')
+    if (key == 'q') {
+        av_log(NULL, AV_LOG_INFO, "\n\n[q] command received. Exiting.\n\n");
         return AVERROR_EXIT;
+    }
     if (key == '+') av_log_set_level(av_log_get_level()+10);
     if (key == '-') av_log_set_level(av_log_get_level()-10);
     if (key == 's') qp_hist     ^= 1;