[FFmpeg-cvslog] avfilter/vaf_spectrumsynth: assert that variables are initialized by switch()

Michael Niedermayer git at videolan.org
Thu Feb 11 23:41:26 CET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Feb 11 23:04:07 2016 +0100| [03c1129b20642df4e713b21afd5ee4844b1c409d] | committer: Michael Niedermayer

avfilter/vaf_spectrumsynth: assert that variables are initialized by switch()

Silences: CID1351387
Silences: CID1351388
Silences: CID1351389

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=03c1129b20642df4e713b21afd5ee4844b1c409d
---

 libavfilter/vaf_spectrumsynth.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavfilter/vaf_spectrumsynth.c b/libavfilter/vaf_spectrumsynth.c
index ba14d8d..8d4014e 100644
--- a/libavfilter/vaf_spectrumsynth.c
+++ b/libavfilter/vaf_spectrumsynth.c
@@ -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);



More information about the ffmpeg-cvslog mailing list