diff mbox

[FFmpeg-devel,v2,1/5] avformat/chromaprint: Fix fp_format option

Message ID 20191006054950.30374-1-andriy.gelman@gmail.com
State New
Headers show

Commit Message

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

The fp_format option was incorrectly declared, meaning that
it could not be set on the cli (via recommended settings
raw/compressed/base64). This is fixed in the commit.
---
 libavformat/chromaprint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gyan Oct. 13, 2019, 1:26 p.m. UTC | #1
On 06-10-2019 11:19 AM, Andriy Gelman wrote:
> From: Andriy Gelman <andriy.gelman@gmail.com>
>
> The fp_format option was incorrectly declared, meaning that
> it could not be set on the cli (via recommended settings
> raw/compressed/base64). This is fixed in the commit.
> ---
>   libavformat/chromaprint.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
> index f39c09ddb9..547e801cdd 100644
> --- a/libavformat/chromaprint.c
> +++ b/libavformat/chromaprint.c
> @@ -164,7 +164,7 @@ fail:
>   static const AVOption options[] = {
>       { "silence_threshold", "threshold for detecting silence", OFFSET(silence_threshold), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 32767, FLAGS },
>       { "algorithm", "version of the fingerprint algorithm", OFFSET(algorithm), AV_OPT_TYPE_INT, { .i64 = CHROMAPRINT_ALGORITHM_DEFAULT }, CHROMAPRINT_ALGORITHM_TEST1, INT_MAX, FLAGS },
> -    { "fp_format", "fingerprint format to write", OFFSET(fp_format), AV_OPT_TYPE_INT, { .i64 = FINGERPRINT_BASE64 }, FINGERPRINT_RAW, FINGERPRINT_BASE64, FLAGS },
> +    { "fp_format", "fingerprint format to write", OFFSET(fp_format), AV_OPT_TYPE_INT, { .i64 = FINGERPRINT_BASE64 }, FINGERPRINT_RAW, FINGERPRINT_BASE64, FLAGS, "fp_format" },
>       { "raw", "binary raw fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_RAW }, INT_MIN, INT_MAX, FLAGS, "fp_format"},
>       { "compressed", "binary compressed fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_COMPRESSED }, INT_MIN, INT_MAX, FLAGS, "fp_format"},
>       { "base64", "Base64 compressed fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_BASE64 }, INT_MIN, INT_MAX, FLAGS, "fp_format"},

Will test and apply.

Gyan
Gyan Oct. 14, 2019, 7:09 a.m. UTC | #2
On 13-10-2019 06:56 PM, Gyan wrote:
>
>
> On 06-10-2019 11:19 AM, Andriy Gelman wrote:
>> From: Andriy Gelman <andriy.gelman@gmail.com>
>>
>> The fp_format option was incorrectly declared, meaning that
>> it could not be set on the cli (via recommended settings
>> raw/compressed/base64). This is fixed in the commit.
>> ---
>>   libavformat/chromaprint.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
>> index f39c09ddb9..547e801cdd 100644
>> --- a/libavformat/chromaprint.c
>> +++ b/libavformat/chromaprint.c
>> @@ -164,7 +164,7 @@ fail:
>>   static const AVOption options[] = {
>>       { "silence_threshold", "threshold for detecting silence", 
>> OFFSET(silence_threshold), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 32767, 
>> FLAGS },
>>       { "algorithm", "version of the fingerprint algorithm", 
>> OFFSET(algorithm), AV_OPT_TYPE_INT, { .i64 = 
>> CHROMAPRINT_ALGORITHM_DEFAULT }, CHROMAPRINT_ALGORITHM_TEST1, 
>> INT_MAX, FLAGS },
>> -    { "fp_format", "fingerprint format to write", OFFSET(fp_format), 
>> AV_OPT_TYPE_INT, { .i64 = FINGERPRINT_BASE64 }, FINGERPRINT_RAW, 
>> FINGERPRINT_BASE64, FLAGS },
>> +    { "fp_format", "fingerprint format to write", OFFSET(fp_format), 
>> AV_OPT_TYPE_INT, { .i64 = FINGERPRINT_BASE64 }, FINGERPRINT_RAW, 
>> FINGERPRINT_BASE64, FLAGS, "fp_format" },
>>       { "raw", "binary raw fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 
>> = FINGERPRINT_RAW }, INT_MIN, INT_MAX, FLAGS, "fp_format"},
>>       { "compressed", "binary compressed fingerprint", 0, 
>> AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_COMPRESSED }, INT_MIN, 
>> INT_MAX, FLAGS, "fp_format"},
>>       { "base64", "Base64 compressed fingerprint", 0, 
>> AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_BASE64 }, INT_MIN, INT_MAX, 
>> FLAGS, "fp_format"},
>
> Will test and apply.

Pushed as 1108bd517363c50740025fcc58ae1e572c8150a0

Thanks,
Gyan
diff mbox

Patch

diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
index f39c09ddb9..547e801cdd 100644
--- a/libavformat/chromaprint.c
+++ b/libavformat/chromaprint.c
@@ -164,7 +164,7 @@  fail:
 static const AVOption options[] = {
     { "silence_threshold", "threshold for detecting silence", OFFSET(silence_threshold), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 32767, FLAGS },
     { "algorithm", "version of the fingerprint algorithm", OFFSET(algorithm), AV_OPT_TYPE_INT, { .i64 = CHROMAPRINT_ALGORITHM_DEFAULT }, CHROMAPRINT_ALGORITHM_TEST1, INT_MAX, FLAGS },
-    { "fp_format", "fingerprint format to write", OFFSET(fp_format), AV_OPT_TYPE_INT, { .i64 = FINGERPRINT_BASE64 }, FINGERPRINT_RAW, FINGERPRINT_BASE64, FLAGS },
+    { "fp_format", "fingerprint format to write", OFFSET(fp_format), AV_OPT_TYPE_INT, { .i64 = FINGERPRINT_BASE64 }, FINGERPRINT_RAW, FINGERPRINT_BASE64, FLAGS, "fp_format" },
     { "raw", "binary raw fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_RAW }, INT_MIN, INT_MAX, FLAGS, "fp_format"},
     { "compressed", "binary compressed fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_COMPRESSED }, INT_MIN, INT_MAX, FLAGS, "fp_format"},
     { "base64", "Base64 compressed fingerprint", 0, AV_OPT_TYPE_CONST, {.i64 = FINGERPRINT_BASE64 }, INT_MIN, INT_MAX, FLAGS, "fp_format"},