diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index d5102f74484f4502461350f9183d4491afb8242f..abc4d58fa976f50d5e607c40327ea2e9511bd097 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -1374,7 +1374,7 @@ static int mov_write_mdat_tag(ByteIOContext *pb, MOVContext *mov)
 }
 
 /* TODO: This needs to be more general */
-static void mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
+static int mov_write_ftyp_tag(ByteIOContext *pb, AVFormatContext *s)
 {
     MOVContext *mov = s->priv_data;
     offset_t pos = url_ftell(pb);