diff options
author | wm4 <wm4@nowhere> | 2013-06-21 21:34:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-25 00:11:56 +0200 |
commit | 98388c0c073906f4485420485e27a14e8d957a2d (patch) | |
tree | b2bd98d6b502d106e07ef17b0a918464e69756ac /demux/demux.c | |
parent | b37147744e34c0f23acb391de6bd04a0a1dc8cca (diff) | |
download | mpv-98388c0c073906f4485420485e27a14e8d957a2d.tar.bz2 mpv-98388c0c073906f4485420485e27a14e8d957a2d.tar.xz |
subreader: turn into actual demuxer
subreader.c (before this commit renamed to demux_subreader.c) was
special cased to the -sub option. The plan is using the normal demuxer
codepath for all subtitle formats (so we can prefer libavformat demuxers
for most formats).
There are some subtle changes. The probe size is restricted to 32 KB
(instead of unlimitted + giving up after 100 lines of input). For
formats like MicroDVD, the video FPS isn't used anymore, because it's
not available on the subtitle demuxer level. Instead, hardcode it to
23.976 FPS (libavformat seems to do the same). The user can probably
still use -sub-fps to fix the timing. Checking the file extension for
".utf"/".utf8"/".utf-8" is simply removed (seems worthless, was in the
way, and I've never seen this anywhere).
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c index be00f38bd7..379a74f654 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -68,6 +68,7 @@ extern const demuxer_desc_t demuxer_desc_mpeg4_es; extern const demuxer_desc_t demuxer_desc_h264_es; extern const demuxer_desc_t demuxer_desc_mpeg_ts; extern const demuxer_desc_t demuxer_desc_sub; +extern const demuxer_desc_t demuxer_desc_subreader; /* Please do not add any new demuxers here. If you want to implement a new * demuxer, add it to libavformat, except for wrappers around external @@ -83,6 +84,7 @@ const demuxer_desc_t *const demuxer_list[] = { #endif &demuxer_desc_matroska, &demuxer_desc_lavf, + &demuxer_desc_subreader, &demuxer_desc_avi, &demuxer_desc_asf, #ifdef CONFIG_MNG |