diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index 8dccbbe0852f50f73a503c2edf152ced9ac48b82..5ead5ac4549203f3d144ad123f23ee95164b66fb 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -224,7 +224,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     codec = stream->codec;
 
     /* This is used by LibavutilCallback (avutil.h) to print messages */
-    codec->opaque = (void*)p_mux;
+    codec->opaque = p_mux;
 
     switch( p_input->p_fmt->i_cat )
     {