From 1cf377f1727d39ed53b7b83a8606405f53055a0c Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Fri, 28 Jan 2022 21:12:31 +0100 Subject: [PATCH] Disallow start_video outside of video player (fixes #4642) --- README.md | 2 +- src/engine/client/client.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 237009d2d37..20c43c81e2b 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Whether to enable the autoupdater. Packagers may want to disable this for their Whether to enable client compilation. If set to OFF, DDNet will not depend on Curl, Freetype, Ogg, Opus, Opusfile, and SDL2. Default value is ON. * **-DVIDEORECORDER=[ON|OFF]**
-Whether to add video recording support using FFmpeg to the client. You can use command `start_video` and `stop_video` to start and stop conversion from demo to mp4. This feature is currently experimental and not enabled by default. +Whether to add video recording support using FFmpeg to the client. Default value is OFF. Dependencies needed on debian: `libx264-dev libavfilter-dev libavdevice-dev libavformat-dev libavcodec-extra libavutil-dev` diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 64422f7eb47..45cec36f137 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -3393,7 +3393,10 @@ void CClient::Con_StartVideo(IConsole::IResult *pResult, void *pUserData) CClient *pSelf = (CClient *)pUserData; if(pSelf->State() != IClient::STATE_DEMOPLAYBACK) + { pSelf->m_pConsole->Print(IConsole::OUTPUT_LEVEL_STANDARD, "videorecorder", "Can not start videorecorder outside of demoplayer."); + return; + } if(!IVideo::Current()) {