dct/rdft: Add missing typedefs for context structs
authorDiego Biurrun <diego@biurrun.de>
Fri, 18 Jul 2014 13:07:26 +0000 (06:07 -0700)
committerDiego Biurrun <diego@biurrun.de>
Tue, 22 Jul 2014 18:55:40 +0000 (11:55 -0700)
Without the typedefs there can be trouble depending on #include order.

libavcodec/dct.h
libavcodec/rdft.h

index 3fd4e27..24926a7 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "rdft.h"
 
-struct DCTContext {
+typedef struct DCTContext {
     int nbits;
     int inverse;
     RDFTContext rdft;
@@ -36,7 +36,7 @@ struct DCTContext {
     FFTSample *csc2;
     void (*dct_calc)(struct DCTContext *s, FFTSample *data);
     void (*dct32)(FFTSample *out, const FFTSample *in);
-};
+} DCTContext;
 
 /**
  * Set up DCT.
index 8ff620f..f9a23ff 100644 (file)
@@ -48,7 +48,7 @@ extern SINTABLE(16384);
 extern SINTABLE(32768);
 extern SINTABLE(65536);
 
-struct RDFTContext {
+typedef struct RDFTContext {
     int nbits;
     int inverse;
     int sign_convention;
@@ -58,7 +58,7 @@ struct RDFTContext {
     SINTABLE_CONST FFTSample *tsin;
     FFTContext fft;
     void (*rdft_calc)(struct RDFTContext *s, FFTSample *z);
-};
+} RDFTContext;
 
 /**
  * Set up a real FFT.