diff --git a/libswresample/resample.c b/libswresample/resample.c
index 5a82e73875cdd55e9aeccab73ff14479ed19648e..bf412dd2681968acf3b56ea4ec6e46f1ebd4ede6 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -224,7 +224,7 @@ ResampleContext *swri_resample_init(ResampleContext *c, int out_rate, int in_rat
             break;
         default:
             av_log(NULL, AV_LOG_ERROR, "Unsupported sample format\n");
-            return NULL;
+            av_assert0(0);
         }
 
         c->phase_shift   = phase_shift;