Skip to content

Commit

Permalink
fix: properly initialize atomic flag
Browse files Browse the repository at this point in the history
  • Loading branch information
fdecampredon committed Jun 13, 2024
1 parent 3ae679c commit 5eb4b9e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion android/cpp/VideoCompositionFramesExtractorHostObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class JSI_EXPORT VideoCompositionFramesExtractorHostObject
private:
global_ref<NativeEventDispatcher> jEventDispatcher;
global_ref<VideoCompositionFramesExtractor> player;
std::atomic_flag released;
std::atomic_flag released = ATOMIC_FLAG_INIT;
void release();
};

Expand Down
2 changes: 1 addition & 1 deletion android/cpp/VideoPlayerHostObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class JSI_EXPORT VideoPlayerHostObject : public jsi::HostObject,
private:
global_ref<NativeEventDispatcher> jEventDispatcher;
jni::global_ref<VideoPlayer> player;
std::atomic_flag released;
std::atomic_flag released = ATOMIC_FLAG_INIT;
void release();
};

Expand Down
2 changes: 1 addition & 1 deletion ios/VideoFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class JSI_EXPORT VideoFrame : public jsi::HostObject {
void release();

private:
std::atomic_flag released = false;
std::atomic_flag released = ATOMIC_FLAG_INIT;
CVPixelBufferRef pixelBuffer;
double width;
double height;
Expand Down
2 changes: 1 addition & 1 deletion ios/VideoPlayerHostObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class JSI_EXPORT VideoPlayerHostObject : public jsi::HostObject, EventEmitter {
float width;
float height;
int rotation;
std::atomic_flag released;
std::atomic_flag released = ATOMIC_FLAG_INIT;
void release();
};
} // namespace RNSkiaVideo

0 comments on commit 5eb4b9e

Please sign in to comment.