Guest User

untrunc patch required to fix my video

a guest
Jan 29th, 2015
207
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -urp untrunc-master.old/track.cpp untrunc-master/track.cpp
  2. --- untrunc.old/track.cpp   2015-01-15 13:53:12.000000000 +0000
  3. +++ untrunc/track.cpp   2015-01-30 02:27:11.000000000 +0000
  4. @@ -226,7 +226,7 @@ int Codec::getLength(unsigned char *star
  5.  
  6.          if(length > maxlength) return -1;
  7.  
  8. -#define SPLIT_NAL_PACKETS 1
  9. +//#define SPLIT_NAL_PACKETS 1
  10.  #ifdef SPLIT_NAL_PACKETS
  11.          return length;
  12.  #endif
  13. @@ -240,10 +240,10 @@ int Codec::getLength(unsigned char *star
  14.              int l = be32toh(*(int *)pos);
  15.              if(l <= 0) break;
  16.              if(pos[0] != 0) break; //not avc1
  17.  
  18.              int nal_type = (pos[4] & 0x1f);
  19.              cout << "Intermediate nal type: " << nal_type << endl;
  20. -            if(nal_type <= 5) found = true;
  21. +//            if(nal_type <= 5) found = true;
  22.  
  23.              //if(nal_type <= 5 || nal_type >= 18) break;//wrong nal or not video
  24.              if(nal_type > 12) break; //unknown nal type
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×