From 331982b99ce3b50b95ac340eb17c6116913480f3 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 15 Apr 2013 21:25:21 +0200 Subject: sub, demux: identify subtitle types with the codec name Get rid of the 1-char subtitle type field. Use sh_stream->codec instead just like audio and video do. Use codec names as defined by libavcodec for simplicity, even if they're somewhat verbose and annoying. Note that ffmpeg might switch to "ass" as codec name for ASS, so we don't bother with the current silly "ssa" name. --- sub/dec_sub.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sub/dec_sub.h') diff --git a/sub/dec_sub.h b/sub/dec_sub.h index f66f05c021..593eac1e03 100644 --- a/sub/dec_sub.h +++ b/sub/dec_sub.h @@ -10,10 +10,9 @@ struct sh_sub; struct ass_track; struct MPOpts; -static inline bool is_text_sub(int type) -{ - return type == 't' || type == 'm' || type == 'a'; -} +bool is_text_sub(const char *t); +bool is_ass_sub(const char *t); +bool is_dvd_sub(const char *t); void sub_decode(struct sh_sub *sh, struct osd_state *osd, void *data, int data_len, double pts, double duration); -- cgit v1.2.3