OSDN Git Service

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

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

index 41cab95..2ec94f9 100644 (file)
@@ -33,8 +33,6 @@ 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 f8d6961..7f86223 100644 (file)
@@ -120,7 +120,10 @@ public class Mpeg2TSPacket {
                 //cal.showPAT(tsbyte);
                 if (isPAT(payload_byte)){
                     pat_list_now = readPAT_byte(payload_byte);
-                    pat_list_all.addAll(pat_list_now);
+                    if (pat_list_now.size()>3){
+                        pat_list_all=pat_list_now;
+                    }
+                    //pat_list_all.addAll(pat_list_now);
                 }
             }
             for (int i = 0; i < pat_list_now.size(); i++) {
@@ -346,7 +349,8 @@ public class Mpeg2TSPacket {
         ByteArrayOutputStream baoscrc = new ByteArrayOutputStream(nowt + 1);
         baoscrc.write(pointer_field[0]);
         baoscrc.write(baos.toByteArray(), 0, baos.size());
-        byte[] crc = getCRC32_byte(baoscrc.toByteArray(), 1);
+        byte[] crc = cal.getCRC32_byte(baoscrc.toByteArray(), 1);
+        //byte[] crc = getCRC32_byte(baoscrc.toByteArray(), 1);
         baos.write(crc, 0, crc.length);
         int ill3 = payload_temp.length - baos.size();
         for (int ir = 0; ir < ill3; ir++) {