diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c
index 90c806f2d52a3fc678558043e20e9469468095d3..ff61f21c91fb10ad167d011a539429ab968c359a 100644
--- a/libavformat/ffmdec.c
+++ b/libavformat/ffmdec.c
@@ -512,12 +512,14 @@ static int ffm_probe(AVProbeData *p)
     return 0;
 }
 
-static void ffm_close(AVFormatContext *s)
+static int ffm_close(AVFormatContext *s)
 {
     int i;
 
     for (i = 0; i < s->nb_streams; i++)
         av_freep(&s->streams[i]->codec->rc_eq);
+
+    return 0;
 }
 
 AVInputFormat ffm_demuxer = {