OSDN Git Service

fix some bugs.
[rec10/rec10-git.git] / jTsSplitter / trunk / src / jtssplitter / Tsfile.java
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();