diff mbox

[FFmpeg-devel] Update for Chromaprint 1.4

Message ID 88df2e02-8d12-eb2e-2800-38801f0ffa75@dir.bg
State New
Headers show

Commit Message

Georgi D. Sotirov Dec. 6, 2016, 2:02 p.m. UTC
Hello FFmpeg community,

In new Chromaprint 1.4 (that was released 2016-12-03) type 
ChromaprintContext is no longer void *, but empty structure (see commit 
2132e19 [1] from 2016-06-06 in BitBucket). This breaks compilation of 
libavformat/chromaprint.c, because member ctx of ChromaprintMuxContext 
should be pointer. This simple change resolves the problem.


I hope you apply the patch.

[1] 
https://bitbucket.org/acoustid/chromaprint/commits/2132e1966f240939d1cbb757f8ac7d9cbf53c824


Best Regards,
---
Georgi D. Sotirov

Comments

Hendrik Leppkes Dec. 6, 2016, 6:49 p.m. UTC | #1
On Tue, Dec 6, 2016 at 3:02 PM, Georgi D. Sotirov <gdsotirov@dir.bg> wrote:
> Hello FFmpeg community,
>
> In new Chromaprint 1.4 (that was released 2016-12-03) type
> ChromaprintContext is no longer void *, but empty structure (see commit
> 2132e19 [1] from 2016-06-06 in BitBucket). This breaks compilation of
> libavformat/chromaprint.c, because member ctx of ChromaprintMuxContext
> should be pointer. This simple change resolves the problem.
>
> diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
> index de73181..8c9a6c0 100644
> --- a/libavformat/chromaprint.c
> +++ b/libavformat/chromaprint.c
> @@ -39,11 +39,7 @@ typedef struct ChromaprintMuxContext {
>      int silence_threshold;
>      int algorithm;
>      FingerprintFormat fp_format;
> -#if CPR_VERSION_INT >= AV_VERSION_INT(1, 4, 0)
> -    ChromaprintContext * ctx;
> -#else
>      ChromaprintContext ctx;
> -#endif
>  } ChromaprintMuxContext;
>

Your patch looks odd, why are you removing 1.4 compat code?

- Hendrik
Carl Eugen Hoyos Dec. 6, 2016, 8:09 p.m. UTC | #2
2016-12-06 15:02 GMT+01:00 Georgi D. Sotirov <gdsotirov@dir.bg>:

> diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
> index de73181..8c9a6c0 100644
> --- a/libavformat/chromaprint.c
> +++ b/libavformat/chromaprint.c
> @@ -39,11 +39,7 @@ typedef struct ChromaprintMuxContext {
>      int silence_threshold;
>      int algorithm;
>      FingerprintFormat fp_format;
> -#if CPR_VERSION_INT >= AV_VERSION_INT(1, 4, 0)
> -    ChromaprintContext * ctx;
> -#else
>      ChromaprintContext ctx;
> -#endif

I applied your patch, please use git format-patch in the future.

Carl Eugen
diff mbox

Patch

diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
index de73181..8c9a6c0 100644
--- a/libavformat/chromaprint.c
+++ b/libavformat/chromaprint.c
@@ -39,11 +39,7 @@  typedef struct ChromaprintMuxContext {
      int silence_threshold;
      int algorithm;
      FingerprintFormat fp_format;
-#if CPR_VERSION_INT >= AV_VERSION_INT(1, 4, 0)
-    ChromaprintContext * ctx;
-#else
      ChromaprintContext ctx;
-#endif
  } ChromaprintMuxContext;

  static void cleanup(ChromaprintMuxContext *cpr)