diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 3be43341729d4663e50150ca06cd087033f860ae..bc1d7de7318d87a747b07e333ea1e4408658b5ea 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -83,6 +83,7 @@ AVOutputFormat ass_muxer = {
     .mime_type      = "text/x-ssa",
     .extensions     = "ass,ssa",
     .priv_data_size = sizeof(ASSContext),
+    .subtitle_codec = CODEC_ID_SSA,
     .write_header   = write_header,
     .write_packet   = write_packet,
     .write_trailer  = write_trailer,