[vlc-devel] [PATCH v2 2/2] avformat: enable SPU_ES muxing
Alexandre Janniaux
ajanni at videolabs.io
Fri Feb 7 22:52:44 CET 2020
The codec support in avformat should be mapped by the GetFfmpegCodec
call at the beginning of the function. In particular, this patch will
allow muxing subrip/text SPU within Matroska files.
---
modules/demux/avformat/mux.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
index a02206efbf..161aeabb8c 100644
--- a/modules/demux/avformat/mux.c
+++ b/modules/demux/avformat/mux.c
@@ -220,10 +220,16 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
i_codec_id = AV_CODEC_ID_MP3;
}
- if( fmt->i_cat != VIDEO_ES && fmt->i_cat != AUDIO_ES)
+ /* Whitelist allowed ES categories */
+ switch( fmt->i_cat )
{
- msg_Warn( p_mux, "Unhandled ES category" );
- return VLC_EGENERIC;
+ case VIDEO_ES:
+ case AUDIO_ES:
+ case SPU_ES:
+ break;
+ default:
+ msg_Warn( p_mux, "Unhandled ES category" );
+ return VLC_EGENERIC;
}
/* */
--
2.25.0
More information about the vlc-devel
mailing list