Commit 7dfc8992 authored by Laurent Aimar's avatar Laurent Aimar

Allowed GetFfmpegCodec() to convert more subtitle codecs.

parent c26c8d73
...@@ -408,14 +408,12 @@ static const struct ...@@ -408,14 +408,12 @@ static const struct
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 33, 0 ) #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 33, 0 )
{ VLC_CODEC_BD_PG, CODEC_ID_HDMV_PGS_SUBTITLE, SPU_ES }, { VLC_CODEC_BD_PG, CODEC_ID_HDMV_PGS_SUBTITLE, SPU_ES },
#endif #endif
#if 0
{ VLC_CODEC_SPU, CODEC_ID_DVD_SUBTITLE, SPU_ES }, { VLC_CODEC_SPU, CODEC_ID_DVD_SUBTITLE, SPU_ES },
{ VLC_CODEC_DVBS, CODEC_ID_DVB_SUBTITLE, SPU_ES }, { VLC_CODEC_DVBS, CODEC_ID_DVB_SUBTITLE, SPU_ES },
{ VLC_CODEC_SUBT, CODEC_ID_TEXT, SPU_ES }, { VLC_CODEC_SUBT, CODEC_ID_TEXT, SPU_ES },
{ VLC_CODEC_XSUB, CODEC_ID_XSUB, SPU_ES }, { VLC_CODEC_XSUB, CODEC_ID_XSUB, SPU_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 50, 0 ) #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 50, 0 )
{ VLC_CODEC_SSA, CODEC_ID_SSA, SPU_ES }, { VLC_CODEC_SSA, CODEC_ID_SSA, SPU_ES },
#endif
#endif #endif
{ 0, 0, UNKNOWN_ES } { 0, 0, UNKNOWN_ES }
......
...@@ -64,6 +64,15 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context, ...@@ -64,6 +64,15 @@ int InitSubtitleDec(decoder_t *dec, AVCodecContext *context,
{ {
decoder_sys_t *sys; decoder_sys_t *sys;
/* */
switch (codec_id) {
case CODEC_ID_HDMV_PGS_SUBTITLE:
break;
default:
msg_Warn(dec, "refusing to decode non validated subtitle codec");
return VLC_EGENERIC;
}
/* */ /* */
dec->p_sys = sys = malloc(sizeof(*sys)); dec->p_sys = sys = malloc(sizeof(*sys));
if (!sys) if (!sys)
......
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