Skip to content

Commit

Permalink
Fix slow initial stream reading
Browse files Browse the repository at this point in the history
regression, addresses #37
  • Loading branch information
UniqProject committed Feb 11, 2023
1 parent 1a9cb11 commit 10776bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions BDInfo/BDROM/TSCodecHEVC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ public static void Scan(TSVideoStream stream, TSStreamBuffer buffer, ref string
}

buffer.BSSkipNextByte();
buffer.BSSkipBytes((int)(lastStreamPos - buffer.Position), true);
}
} while ((buffer.Position < buffer.Length - 3) &&
(!_isInitialized || (_isInitialized && !frameTypeRead)));
Expand Down
2 changes: 2 additions & 0 deletions BDInfo/BDROM/TSStreamFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,8 @@ public void Scan(List<TSPlaylistFile> playlists, bool isFullScan)
}
*/
CreateStream(streamPID, streamType, streamDescriptors);
if (Streams[streamPID].IsGraphicsStream)
Streams[streamPID].IsInitialized = !isFullScan;
}
k += streamInfoLength;
}
Expand Down

0 comments on commit 10776bf

Please sign in to comment.