demux_lavf: support SRT subtitles

Support subrip format subtitles.

Patch by Philip Langdale [philipl overt org].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35118 b3059339-0415-0410-9bf9-f77b7e298cf2

Conflicts:
	libmpdemux/demux_lavf.c
This commit is contained in:
reimar 2012-08-25 10:52:00 +00:00 committed by wm4
parent 570c907609
commit 9b8967a7de
1 changed files with 2 additions and 2 deletions

View File

@ -489,8 +489,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i)
case AVMEDIA_TYPE_SUBTITLE: {
sh_sub_t *sh_sub;
char type;
/* only support text subtitles for now */
if (codec->codec_id == CODEC_ID_TEXT)
if (codec->codec_id == CODEC_ID_TEXT ||
codec->codec_id == AV_CODEC_ID_SUBRIP)
type = 't';
else if (codec->codec_id == CODEC_ID_MOV_TEXT)
type = 'm';