subtitles: accept smi in addition to srt

This commit is contained in:
Justin Maggard
2014-04-21 15:44:39 -07:00
parent 0721528bcd
commit 381c4805e6
4 changed files with 36 additions and 26 deletions

16
utils.c
View File

@ -227,14 +227,16 @@ escape_tag(const char *tag, int force_alloc)
return esc_tag;
}
void
strip_ext(char * name)
char *
strip_ext(char *name)
{
char * period;
char *period;
period = strrchr(name, '.');
if( period )
if (period)
*period = '\0';
return period;
}
/* Code basically stolen from busybox */
@ -408,6 +410,12 @@ is_playlist(const char * file)
return (ends_with(file, ".m3u") || ends_with(file, ".pls"));
}
int
is_caption(const char * file)
{
return (ends_with(file, ".srt") || ends_with(file, ".smi"));
}
int
is_album_art(const char * name)
{