Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thread safety checks for PAGView and PAGImageView. #2572

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

kevingpqi123
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.38%. Comparing base (848347f) to head (37b61d8).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2572      +/-   ##
==========================================
+ Coverage   77.33%   77.38%   +0.04%     
==========================================
  Files         420      420              
  Lines       22460    22460              
  Branches     6356     6359       +3     
==========================================
+ Hits        17370    17380      +10     
- Misses       3819     3821       +2     
+ Partials     1271     1259      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -262,14 +270,17 @@ - (BOOL)updateImageViewFrom:(CVPixelBufferRef)pixelBuffer atIndex:(NSInteger)fra
self.currentUIImage = image;
[self submitToImageView];
}
if ([imagesMap count] == (NSUInteger)[[self getPAGDecoder] numFrames]) {
if ([imagesMap count] == numFrames) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你这里还没执行updatePAGDecoder, numFrames可能是0吧?检查一下其他相关的逻辑

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果 pagDeocder 为空,走不这里

@domchen domchen changed the title Add thread safety to PAGView and PAGImageView. Add thread safety checks for PAGView and PAGImageView. Nov 7, 2024
@domchen domchen merged commit 832d86c into main Nov 7, 2024
8 checks passed
@domchen domchen deleted the feature/kevingpqi_ios_async branch November 7, 2024 08:42
Hparty pushed a commit that referenced this pull request Nov 8, 2024
kevingpqi123 added a commit that referenced this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants