diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 05140e32eabfb6a12673941923a563fd8e8328eb..357792693e59e3492b691fc026cecf8d409a2ace 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -3176,8 +3176,9 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
         }
         break;
     default:
-        av_assert0(avctx->bits_per_raw_sample<=8 || avctx->codec_type != AVMEDIA_TYPE_VIDEO);
-        BIT_DEPTH_FUNCS(8, _16);
+        if(avctx->bits_per_raw_sample<=8 || avctx->codec_type != AVMEDIA_TYPE_VIDEO) {
+            BIT_DEPTH_FUNCS(8, _16);
+        }
         break;
     }