K-S-V / Scripts

Collection of my scripts
GNU General Public License v3.0
635 stars 227 forks source link

Warning: unpack(): Type C #94

Closed arbarbosa1979 closed 3 years ago

arbarbosa1979 commented 7 years ago

Does anyone know what the cause of this error?

Warning: unpack(): Type C: not enough input, need 1, have 0 in AdobeHDS.php on line 1667

Notice: Uninitialized string offset: 0 in AdobeHDS.php on line 1667
    {
      $int = unpack('C', $str[$pos]);
      return $int[1];
    }
ut-matt commented 6 years ago

I'm getting the same error.

PHP Notice:  Uninitialized string offset: 0 in AdobeHDS.php on line 1661
PHP Warning:  unpack(): Type C: not enough input, need 1, have 0 in AdobeHDS.php on line 1661

If I let the download run, it will continue to download fragments and create the FLV file, but that file is then unplayable. The error is intermittent, and if I restart the download it often succeeds.