diff --git a/ffserver.c b/ffserver.c
index cfa730a81ae0810bac4bcd5a2b180dea3a1bf16c..4215265b84623f8777c936317feeff10f4812974 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3904,7 +3904,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
         av->rc_buffer_aggressivity = 1.0;
 
         if (!av->rc_eq)
-            av->rc_eq = "tex^qComp";
+            av->rc_eq = av_strdup("tex^qComp");
         if (!av->i_quant_factor)
             av->i_quant_factor = -0.8;
         if (!av->b_quant_factor)