avfilter/vaf_spectrumsynth: assert that variables are initialized by switch()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 11 Feb 2016 22:04:07 +0000 (23:04 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 11 Feb 2016 22:06:24 +0000 (23:06 +0100)
Silences: CID1351387
Silences: CID1351388
Silences: CID1351389

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vaf_spectrumsynth.c

index ba14d8d..8d4014e 100644 (file)
@@ -256,6 +256,8 @@ static void read16_fft_bin(SpectrumSynthContext *s,
     case LOG:
         magnitude = ff_exp10(((m[x] / (double)UINT16_MAX) - 1.) * 6.);
         break;
+    default:
+        av_assert0(0);
     }
     phase = ((p[x] / (double)UINT16_MAX) * 2. - 1.) * M_PI;
 
@@ -279,6 +281,8 @@ static void read8_fft_bin(SpectrumSynthContext *s,
     case LOG:
         magnitude = ff_exp10(((m[x] / (double)UINT8_MAX) - 1.) * 6.);
         break;
+    default:
+        av_assert0(0);
     }
     phase = ((p[x] / (double)UINT8_MAX) * 2. - 1.) * M_PI;
 
@@ -454,6 +458,8 @@ static int try_push_frames(AVFilterContext *ctx)
                 break;
         }
         break;
+    default:
+        av_assert0(0);
     }
 
     av_frame_free(&s->magnitude);