diff mbox

[FFmpeg-devel,v2,3/5] avformat/chromaprint: Improve logging message

Message ID 20191006054950.30374-3-andriy.gelman@gmail.com
State Accepted
Commit 634529c40d62e02bacea3a7f91d4226a9e4b3cbc
Headers show

Commit Message

Andriy Gelman Oct. 6, 2019, 5:49 a.m. UTC
From: Andriy Gelman <andriy.gelman@gmail.com>

Setting silence_threshold requires that -algorithm 3 option is also set.
Add this to the logging message.
---
 libavformat/chromaprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gyan Doshi Oct. 13, 2019, 1:25 p.m. UTC | #1
On 06-10-2019 11:19 AM, Andriy Gelman wrote:
> From: Andriy Gelman <andriy.gelman@gmail.com>
>
> Setting silence_threshold requires that -algorithm 3 option is also set.
> Add this to the logging message.
> ---
>   libavformat/chromaprint.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
> index 547e801cdd..a4c0b97d99 100644
> --- a/libavformat/chromaprint.c
> +++ b/libavformat/chromaprint.c
> @@ -73,7 +73,7 @@ static int write_header(AVFormatContext *s)
>       if (cpr->silence_threshold != -1) {
>   #if CPR_VERSION_INT >= AV_VERSION_INT(0, 7, 0)
>           if (!chromaprint_set_option(cpr->ctx, "silence_threshold", cpr->silence_threshold)) {
> -            av_log(s, AV_LOG_ERROR, "Failed to set silence threshold.\n");
> +            av_log(s, AV_LOG_ERROR, "Failed to set silence threshold. Setting silence_threshold requires -algorithm 3 option.\n");
>               goto fail;
>           }
>   #else
Will apply.

Gyan
Gyan Doshi Oct. 14, 2019, 7:09 a.m. UTC | #2
On 13-10-2019 06:55 PM, Gyan wrote:
>
>
> On 06-10-2019 11:19 AM, Andriy Gelman wrote:
>> From: Andriy Gelman <andriy.gelman@gmail.com>
>>
>> Setting silence_threshold requires that -algorithm 3 option is also set.
>> Add this to the logging message.
>> ---
>>   libavformat/chromaprint.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
>> index 547e801cdd..a4c0b97d99 100644
>> --- a/libavformat/chromaprint.c
>> +++ b/libavformat/chromaprint.c
>> @@ -73,7 +73,7 @@ static int write_header(AVFormatContext *s)
>>       if (cpr->silence_threshold != -1) {
>>   #if CPR_VERSION_INT >= AV_VERSION_INT(0, 7, 0)
>>           if (!chromaprint_set_option(cpr->ctx, "silence_threshold", 
>> cpr->silence_threshold)) {
>> -            av_log(s, AV_LOG_ERROR, "Failed to set silence 
>> threshold.\n");
>> +            av_log(s, AV_LOG_ERROR, "Failed to set silence 
>> threshold. Setting silence_threshold requires -algorithm 3 option.\n");
>>               goto fail;
>>           }
>>   #else
> Will apply.

Pushed as 634529c40d62e02bacea3a7f91d4226a9e4b3cbc

Thanks,
Gyan
diff mbox

Patch

diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
index 547e801cdd..a4c0b97d99 100644
--- a/libavformat/chromaprint.c
+++ b/libavformat/chromaprint.c
@@ -73,7 +73,7 @@  static int write_header(AVFormatContext *s)
     if (cpr->silence_threshold != -1) {
 #if CPR_VERSION_INT >= AV_VERSION_INT(0, 7, 0)
         if (!chromaprint_set_option(cpr->ctx, "silence_threshold", cpr->silence_threshold)) {
-            av_log(s, AV_LOG_ERROR, "Failed to set silence threshold.\n");
+            av_log(s, AV_LOG_ERROR, "Failed to set silence threshold. Setting silence_threshold requires -algorithm 3 option.\n");
             goto fail;
         }
 #else