]> git.sesse.net Git - vlc/commitdiff
avcodec: disable subtitle encoding
authorPierre Ynard <linkfanel@yahoo.fr>
Mon, 14 Sep 2009 07:32:51 +0000 (09:32 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Mon, 14 Sep 2009 07:32:51 +0000 (09:32 +0200)
The avcodec module can be successfully opened to encode subtitle formats
that it recognizes, but support is absent and pf_encode_sub is never
set, which leads to a crash.

modules/codec/avcodec/encoder.c

index 166ed8ec4f40b5496f5c04c38fb2446d1026aea1..19346678a410ecbc9e445e2101d8008323ea48d7 100644 (file)
@@ -232,6 +232,12 @@ int OpenEncoder( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    if( p_enc->fmt_out.i_cat == SPU_ES )
+    {
+        /* We don't support subtitle encoding */
+        return VLC_EGENERIC;
+    }
+
     /* Initialization must be done before avcodec_find_encoder() */
     InitLibavcodec( p_this );