]> git.sesse.net Git - ffmpeg/commitdiff
af_bs2b: Add missing casts to complex pointer assignments
authorDiego Biurrun <diego@biurrun.de>
Mon, 12 Jun 2017 20:12:17 +0000 (22:12 +0200)
committerDiego Biurrun <diego@biurrun.de>
Wed, 21 Jun 2017 10:24:13 +0000 (12:24 +0200)
Fixes several warnings of the type:
libavfilter/af_bs2b.c:171:22: warning: assignment from incompatible pointer type

libavfilter/af_bs2b.c

index 25e786761f0ec0460f03eae8bf7e4153f902f9d2..0468333a8773481af0b46a40ee8f541cffa45408 100644 (file)
@@ -32,6 +32,8 @@
 #include "formats.h"
 #include "internal.h"
 
+typedef void (*filter_func)(t_bs2bdp bs2bdp, uint8_t *sample, int n);
+
 typedef struct Bs2bContext {
     const AVClass *class;
 
@@ -41,7 +43,7 @@ typedef struct Bs2bContext {
 
     t_bs2bdp bs2bp;
 
-    void (*filter)(t_bs2bdp bs2bdp, uint8_t *sample, int n);
+    filter_func filter;
 } Bs2bContext;
 
 #define OFFSET(x) offsetof(Bs2bContext, x)
@@ -165,19 +167,19 @@ static int config_output(AVFilterLink *outlink)
 
     switch (inlink->format) {
     case AV_SAMPLE_FMT_U8:
-        bs2b->filter = bs2b_cross_feed_u8;
+        bs2b->filter = (filter_func) bs2b_cross_feed_u8;
         break;
     case AV_SAMPLE_FMT_S16:
-        bs2b->filter = bs2b_cross_feed_s16;
+        bs2b->filter = (filter_func) bs2b_cross_feed_s16;
         break;
     case AV_SAMPLE_FMT_S32:
-        bs2b->filter = bs2b_cross_feed_s32;
+        bs2b->filter = (filter_func) bs2b_cross_feed_s32;
         break;
     case AV_SAMPLE_FMT_FLT:
-        bs2b->filter = bs2b_cross_feed_f;
+        bs2b->filter = (filter_func) bs2b_cross_feed_f;
         break;
     case AV_SAMPLE_FMT_DBL:
-        bs2b->filter = bs2b_cross_feed_d;
+        bs2b->filter = (filter_func) bs2b_cross_feed_d;
         break;
     default:
         return AVERROR_BUG;