[FFmpeg-cvslog] avfilter/af_asoftclip: add asserts in default switch cases

Paul B Mahol git at videolan.org
Tue Nov 3 13:31:30 EET 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Nov  3 12:28:02 2020 +0100| [112fe0ff194ffe7670fbc0690e6b15ba6279e11a] | committer: Paul B Mahol

avfilter/af_asoftclip: add asserts in default switch cases

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

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

diff --git a/libavfilter/af_asoftclip.c b/libavfilter/af_asoftclip.c
index b656dcfa45..ce1f7ea96a 100644
--- a/libavfilter/af_asoftclip.c
+++ b/libavfilter/af_asoftclip.c
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/avassert.h"
 #include "libavutil/channel_layout.h"
 #include "libavutil/opt.h"
 #include "avfilter.h"
@@ -162,6 +163,8 @@ static void filter_flt(ASoftClipContext *s,
                 dst[n] = erff(src[n]);
             }
             break;
+        default:
+            av_assert0(0);
         }
     }
 }
@@ -229,6 +232,8 @@ static void filter_dbl(ASoftClipContext *s,
                 dst[n] = erf(src[n]);
             }
             break;
+        default:
+            av_assert0(0);
         }
     }
 }
@@ -243,6 +248,7 @@ static int config_input(AVFilterLink *inlink)
     case AV_SAMPLE_FMT_FLTP: s->filter = filter_flt; break;
     case AV_SAMPLE_FMT_DBL:
     case AV_SAMPLE_FMT_DBLP: s->filter = filter_dbl; break;
+    default: av_assert0(0);
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list