[vlc-devel] commit: avcodec: disable subtitle encoding (Pierre Ynard )
git version control
git at videolan.org
Mon Sep 14 09:33:49 CEST 2009
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Sep 14 09:32:51 2009 +0200| [2631cc77ba624894a204814219e8adf449207b21] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2631cc77ba624894a204814219e8adf449207b21
---
modules/codec/avcodec/encoder.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 166ed8e..1934667 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -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 );
More information about the vlc-devel
mailing list