Setting silence_threshold requires that -algorithm is set to 3.
Unified · Split
| @@ -73,7 +73,7 @@ static int write_header(AVFormatContext *s) · 72 unmodified lines | |||
| 73 | if (cpr->silence_threshold != -1) { | 73 | if (cpr->silence_threshold != -1) { |
| 74 | #if CPR_VERSION_INT >= AV_VERSION_INT(0, 7, 0) | 74 | #if CPR_VERSION_INT >= AV_VERSION_INT(0, 7, 0) |
| 75 | if (!chromaprint_set_option(cpr->ctx, "silence_threshold", cpr->silence_threshold)) { | 75 | if (!chromaprint_set_option(cpr->ctx, "silence_threshold", cpr->silence_threshold)) { |
| 76 | av_log(s, AV_LOG_ERROR, "Failed to set silence threshold.\n"); | 76 | av_log(s, AV_LOG_ERROR, "Failed to set silence threshold. Setting silence_threshold requires -algorithm 3 option.\n"); |
| 77 | goto fail; | 77 | goto fail; |
| 78 | } | 78 | } |
| 79 | #else | 79 | #else |