summaryrefslogtreecommitdiffstats
path: root/demux/demux_sub.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-06-22 02:09:52 +0200
committerwm4 <wm4@nowhere>2013-06-25 00:11:56 +0200
commitcfa45c40dc0cfe44b699029168b62d4d3e16c288 (patch)
tree5a80d3b6e82711a5816c509e803c029b93342892 /demux/demux_sub.c
parent1bfae45a88ac7c24b74a6f7ca6eb4aa27d20c653 (diff)
downloadmpv-cfa45c40dc0cfe44b699029168b62d4d3e16c288.tar.bz2
mpv-cfa45c40dc0cfe44b699029168b62d4d3e16c288.tar.xz
sub: add demux_libass wrapper, drop old hacks
demux_libass.c allows us to make subtitle format detection part of the normal file loading process. libass has no probe function, but trying to load the start of a file (the first 4 KB) is good enough. Hope that libass can even handle random binary input gracefully without printing stupid log messages, and that the libass parser doesn't accept too many non-ASS files as input. This doesn't handle the -subcp option correctly yet. This will be fixed later.
Diffstat (limited to 'demux/demux_sub.c')
-rw-r--r--demux/demux_sub.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/demux/demux_sub.c b/demux/demux_sub.c
deleted file mode 100644
index ab99091215..0000000000
--- a/demux/demux_sub.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * This file is part of mpv.
- *
- * mpv is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * mpv is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with mpv. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// Note: not a real demuxer. The frontend has its own code to open subtitle
-// code, and then creates a new dummy demuxer with new_sub_demuxer().
-// But eventually, all subtitles should be opened this way, and this
-// file can be removed.
-
-#include "demux.h"
-
-static int dummy_fill_buffer(struct demuxer *demuxer, struct demux_stream *ds)
-{
- return 0;
-}
-
-const struct demuxer_desc demuxer_desc_sub = {
- .info = "External subtitles pseudo demuxer",
- .name = "sub",
- .shortdesc = "sub",
- .author = "",
- .comment = "",
- .type = DEMUXER_TYPE_SUB,
- .fill_buffer = dummy_fill_buffer,
-};