[MPlayer-cvslog] CVS: main subreader.c,1.147,1.148

Ivan Kalvachev CVS syncmail at mplayerhq.hu
Sat Mar 18 00:38:49 CET 2006


CVS change done by Ivan Kalvachev CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv30786

Modified Files:
	subreader.c 
Log Message:
if stream is not seekable calling enca would prevent the real parsing of subtitles.


Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -r1.147 -r1.148
--- subreader.c	17 Mar 2006 19:39:30 -0000	1.147
+++ subreader.c	17 Mar 2006 23:38:46 -0000	1.148
@@ -1086,11 +1086,12 @@
 		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




More information about the MPlayer-cvslog mailing list