aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-02-16 14:29:06 +0100
committerdec05eba <dec05eba@protonmail.com>2025-02-16 14:29:06 +0100
commita8b26621d444ae155d9bebaf0c4a5d3d34032d52 (patch)
tree171d956c860f3b362a7d843b136a0c7fca530459 /src/main.cpp
parent1b5cde07896518202f491672977beb3172142f12 (diff)
Only show codec warning for image output
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 7fc5326..7d4a47e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3086,13 +3086,14 @@ static AudioDeviceData create_application_audio_audio_input(const MergedAudioInp
static void set_video_codec_for_image_output(const char *filename, VideoCodec *video_codec, const char **video_codec_to_use) {
const bool video_codec_auto = strcmp(*video_codec_to_use, "auto") == 0;
- if(!video_codec_auto)
- fprintf(stderr, "Warning: expected -k option to be set to 'auto' (or not specified) for image output\n");
-
if(string_ends_with(filename, ".jpg") || string_ends_with(filename, ".jpeg")) {
+ if(!video_codec_auto)
+ fprintf(stderr, "Warning: expected -k option to be set to 'auto' (or not specified) for jpeg output\n");
*video_codec = VideoCodec::JPEG;
*video_codec_to_use = "jpeg";
} else if(string_ends_with(filename, ".png")) {
+ if(!video_codec_auto)
+ fprintf(stderr, "Warning: expected -k option to be set to 'auto' (or not specified) for png output\n");
*video_codec = VideoCodec::PNG;
*video_codec_to_use = "png";
}