mirror of
https://github.com/mpv-player/mpv
synced 2025-04-11 04:01:31 +00:00
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
This commit is contained in:
parent
5feccfd289
commit
c0e553be1e
@ -1086,11 +1086,12 @@ void subcp_open (stream_t *st)
|
|||||||
int free_cp_tmp = 0;
|
int free_cp_tmp = 0;
|
||||||
if (sscanf(sub_cp, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
|
if (sscanf(sub_cp, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
|
||||||
|| 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);
|
cp_tmp = guess_cp(st, enca_lang, enca_fallback);
|
||||||
free_cp_tmp = 1;
|
free_cp_tmp = 1;
|
||||||
} else {
|
} else {
|
||||||
cp_tmp = enca_fallback;
|
cp_tmp = enca_fallback;
|
||||||
|
mp_msg(MSGT_SUBREADER,MSGL_WARN,"SUB: enca faild, stream must be seakable.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user