summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authoriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-17 23:38:46 +0000
committeriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-17 23:38:46 +0000
commitc0e553be1e00d03e7881d958068c5aaab79715f6 (patch)
treebc343b3e225c64665ccad3d4987ab062c7f3ab5d /subreader.c
parent5feccfd289f4f266ed40350c01263ce75fc7453d (diff)
downloadmpv-c0e553be1e00d03e7881d958068c5aaab79715f6.tar.bz2
mpv-c0e553be1e00d03e7881d958068c5aaab79715f6.tar.xz
if stream is not seekable calling enca would prevent the real parsing of subtitles.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17886 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/subreader.c b/subreader.c
index 0deef7be93..5d59268562 100644
--- a/subreader.c
+++ b/subreader.c
@@ -1086,11 +1086,12 @@ void subcp_open (stream_t *st)
int free_cp_tmp = 0;
if (sscanf(sub_cp, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
|| sscanf(sub_cp, "ENCA:%2s:%99s", enca_lang, enca_fallback) == 2) {
- if (st) {
+ if (st && st->flags & STREAM_SEEK ) {
cp_tmp = guess_cp(st, enca_lang, enca_fallback);
free_cp_tmp = 1;
} else {
cp_tmp = enca_fallback;
+ mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: enca faild, stream must be seakable.\n");
}
}
#endif