Commit 1693336a authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/af_apulsator: assert that pathes leaving uninitialized variables do not occur

Fixes: CID1341581, CID1341582
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 4c573f8c
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */
#include "libavutil/avassert.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "avfilter.h" #include "avfilter.h"
#include "internal.h" #include "internal.h"
...@@ -117,6 +118,7 @@ static double lfo_get_value(SimpleLFO *lfo) ...@@ -117,6 +118,7 @@ static double lfo_get_value(SimpleLFO *lfo)
case SAWDOWN: case SAWDOWN:
val = 1 - phs * 2; val = 1 - phs * 2;
break; break;
default: av_assert0(0);
} }
return val * lfo->amount; return val * lfo->amount;
...@@ -207,6 +209,7 @@ static int config_input(AVFilterLink *inlink) ...@@ -207,6 +209,7 @@ static int config_input(AVFilterLink *inlink)
case UNIT_BPM: freq = s->bpm / 60; break; case UNIT_BPM: freq = s->bpm / 60; break;
case UNIT_MS: freq = 1 / (s->ms / 1000.); break; case UNIT_MS: freq = 1 / (s->ms / 1000.); break;
case UNIT_HZ: freq = s->hz; break; case UNIT_HZ: freq = s->hz; break;
default: av_assert0(0);
} }
s->lfoL.freq = freq; s->lfoL.freq = freq;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment