OSDN Git Service

fix some bugs.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Fri, 29 Jan 2010 00:07:36 +0000 (00:07 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Fri, 29 Jan 2010 00:07:36 +0000 (00:07 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@417 4e526526-5e11-4fc0-8910-f8fd03428081

jTsSplitter/trunk/src/jtssplitter/Main.java
jTsSplitter/trunk/src/jtssplitter/Tsfile.java

index 2ec94f9..41cab95 100644 (file)
@@ -33,6 +33,8 @@ public class Main {
             }
         }
         Tsfile t1 = new Tsfile();
+        inf="/home/ftpusr/ftp-tmp/バカとテストと召喚獣 第4問「愛とスパイスとお弁当」.ts.tsmix";
+        outf="/home/ftpusr/ftp-tmp/バカとテストと召喚獣 第4問「愛とスパイスとお弁当」.ts";
         t1.splitTS_byte(inf, outf, ch);
     }
 }
index 4a423fb..3d64dd7 100644 (file)
@@ -167,7 +167,9 @@ public class Tsfile {
             //int[] PIDCount = new int[8200];
             int imax=1000;
             for (int i = 0; i < imax ; i++) {
-                in.read(tb);
+                if (in.read(tb)==-1){
+                    break;
+                }
                 String last8;
                 Mpeg2TSPacket m2tp;
                 m2tp = new Mpeg2TSPacket();