Commit 3693093c authored by Pierre Ynard's avatar Pierre Ynard

avcodec: disable subtitle encoding

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.
(cherry picked from commit 2631cc77)
parent 7679ffc3
...@@ -237,6 +237,12 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -237,6 +237,12 @@ int OpenEncoder( vlc_object_t *p_this )
return VLC_EGENERIC; 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() */ /* Initialization must be done before avcodec_find_encoder() */
InitLibavcodec( p_this ); InitLibavcodec( p_this );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment