Skip to content

Commit

Permalink
demux_libass: remove this demuxer
Browse files Browse the repository at this point in the history
This loaded external .ass files via libass. libavformat's .ass reader is
now good enough, so use that instead.

Apparently libavformat still doesn't support fonts embedded into text
.ass files, but support for this has been accidentally broken in mpv for
a while anyway. (And only 1 person complained.)
  • Loading branch information
wm4 committed Nov 11, 2015
1 parent 977869a commit 384b13c
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 138 deletions.
3 changes: 1 addition & 2 deletions TOOLS/old-makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ SOURCES-$(DVDNAV) += stream/stream_dvdnav.c \
stream/stream_dvd_common.c

SOURCES-$(RUBBERBAND) += audio/filter/af_rubberband.c
SOURCES-$(LIBASS) += sub/ass_mp.c sub/sd_ass.c \
demux/demux_libass.c
SOURCES-$(LIBASS) += sub/ass_mp.c sub/sd_ass.c

SOURCES-$(LIBBLURAY) += stream/stream_bluray.c

Expand Down
4 changes: 0 additions & 4 deletions demux/demux.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ extern const demuxer_desc_t demuxer_desc_tv;
extern const demuxer_desc_t demuxer_desc_mf;
extern const demuxer_desc_t demuxer_desc_matroska;
extern const demuxer_desc_t demuxer_desc_lavf;
extern const demuxer_desc_t demuxer_desc_libass;
extern const demuxer_desc_t demuxer_desc_subreader;
extern const demuxer_desc_t demuxer_desc_playlist;
extern const demuxer_desc_t demuxer_desc_disc;
Expand All @@ -67,9 +66,6 @@ const demuxer_desc_t *const demuxer_list[] = {
&demuxer_desc_rawvideo,
#if HAVE_TV
&demuxer_desc_tv,
#endif
#if HAVE_LIBASS
&demuxer_desc_libass,
#endif
&demuxer_desc_matroska,
#if HAVE_LIBARCHIVE
Expand Down
111 changes: 0 additions & 111 deletions demux/demux_libass.c

This file was deleted.

18 changes: 0 additions & 18 deletions misc/charset_conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,24 +259,6 @@ const char *mp_charset_guess(void *talloc_ctx, struct mp_log *log, bstr buf,
return res;
}

// Convert the data in buf to UTF-8. The charset argument can be an iconv
// codepage, a value returned by mp_charset_conv_guess(), or a special value
// that triggers autodetection of the charset (e.g. using ENCA).
// The auto-detection is the only difference to mp_iconv_to_utf8().
// buf: same as mp_iconv_to_utf8()
// user_cp: iconv codepage, special value, NULL
// flags: same as mp_iconv_to_utf8()
// returns: same as mp_iconv_to_utf8()
bstr mp_charset_guess_and_conv_to_utf8(struct mp_log *log, bstr buf,
const char *user_cp, int flags)
{
void *tmp = talloc_new(NULL);
const char *cp = mp_charset_guess(tmp, log, buf, user_cp, flags);
bstr res = mp_iconv_to_utf8(log, buf, cp, flags);
talloc_free(tmp);
return res;
}

// Use iconv to convert buf to UTF-8.
// Returns buf.start==NULL on error. Returns buf if cp is NULL, or if there is
// obviously no conversion required (e.g. if cp is "UTF-8").
Expand Down
2 changes: 0 additions & 2 deletions misc/charset_conv.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ bool mp_charset_is_utf8(const char *user_cp);
bool mp_charset_requires_guess(const char *user_cp);
const char *mp_charset_guess(void *talloc_ctx, struct mp_log *log, bstr buf,
const char *user_cp, int flags);
bstr mp_charset_guess_and_conv_to_utf8(struct mp_log *log, bstr buf,
const char *user_cp, int flags);
bstr mp_iconv_to_utf8(struct mp_log *log, bstr buf, const char *cp, int flags);

#endif
1 change: 0 additions & 1 deletion wscript_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def build(ctx):
( "demux/demux_edl.c" ),
( "demux/demux_lavf.c" ),
( "demux/demux_libarchive.c", "libarchive" ),
( "demux/demux_libass.c", "libass"),
( "demux/demux_mf.c" ),
( "demux/demux_mkv.c" ),
( "demux/demux_mkv_timeline.c" ),
Expand Down

0 comments on commit 384b13c

Please sign in to comment.