From 070b4b448b4da1b12a9c13a61e28fc6b8028a194 Mon Sep 17 00:00:00 2001 From: Norbert Schlia Date: Wed, 7 Aug 2024 21:59:05 +0200 Subject: [PATCH] Make log entries for unsupported sample/video/audio formats more concise --- src/ffmpegfs.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ffmpegfs.cc b/src/ffmpegfs.cc index 9c4d104f..68d0a57f 100644 --- a/src/ffmpegfs.cc +++ b/src/ffmpegfs.cc @@ -2472,7 +2472,7 @@ int main(int argc, char *argv[]) { if (fmt.filetype() != FILETYPE_UNKNOWN && !fmt.is_sample_fmt_supported()) { - std::fprintf(stderr, "INVALID PARAMETER: Sample format %s not supported for %s\n\n", get_sampleformat_text(params.m_sample_fmt).c_str(), fmt.desttype().c_str()); + std::fprintf(stderr, "INVALID PARAMETER: %s does not support the sample format %s\n\n", fmt.desttype().c_str(), get_sampleformat_text(params.m_sample_fmt).c_str()); std::fprintf(stderr, "Supported formats: %s\n\n", fmt.sample_fmt_list().c_str()); return 1; } @@ -2485,14 +2485,14 @@ int main(int argc, char *argv[]) { if (params.m_audio_codec != AV_CODEC_ID_NONE && !fmt.is_audio_codec_supported(params.m_audio_codec)) { - std::fprintf(stderr, "INVALID PARAMETER: Sample format %s not supported for %s\n\n", get_audio_codec_text(params.m_audio_codec).c_str(), fmt.desttype().c_str()); + std::fprintf(stderr, "INVALID PARAMETER: %s does not support audio codec %s\n\n", fmt.desttype().c_str(), get_audio_codec_text(params.m_audio_codec).c_str()); std::fprintf(stderr, "Supported formats: %s\n\n", fmt.audio_codec_list().c_str()); return 1; } if (params.m_video_codec != AV_CODEC_ID_NONE && !fmt.is_video_codec_supported(params.m_video_codec)) { - std::fprintf(stderr, "INVALID PARAMETER: Sample format %s not supported for %s\n\n", get_video_codec_text(params.m_video_codec).c_str(), fmt.desttype().c_str()); + std::fprintf(stderr, "INVALID PARAMETER: %s does not support video codec %s\n\n", fmt.desttype().c_str(), get_video_codec_text(params.m_video_codec).c_str()); std::fprintf(stderr, "Supported formats: %s\n\n", fmt.video_codec_list().c_str()); return 1; }