瀏覽代碼

Fixed FLV previous tag size error

n1474335 6 年之前
父節點
當前提交
0d2cb02f97
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/core/lib/FileSignatures.mjs

+ 4 - 3
src/core/lib/FileSignatures.mjs

@@ -1317,9 +1317,10 @@ export function extractFLV(bytes, offset) {
             break;
         }
 
-        if (prevTagSize !== tagSize + 11) {
-            // Previous tag was not valid
-            stream.moveBackwardsBy(tagSize + 11);
+        if (prevTagSize !== (tagSize + 11)) {
+            // Previous tag was not valid, reverse back over this header
+            // and the previous tag body and header
+            stream.moveBackwardsBy(tagSize + 11 + 5);
             break;
         }