-
- Downloads
components: pass weak_ptr to Component::Listener
After the component is destroyed, we cannot use shared_from_this() because there must be a valid shared_ptr pointing to the component. This CL changes to use weak_from_this() to get weak_ptr, and locks the weak_ptr when we need shared_ptr. Also, the parameter of Component::Listener's methods is weak_ptr, instead of shared_ptr. This CL also changes to pass weak_ptr to the listener. Bug: 198215986 Test: android.media.cts.VideoEncoderTest#testOtherH264SurfArbitraryH Change-Id: I3bae943f211db5f68e3b9a86bc193eee09cba65e
Showing
- components/V4L2DecodeComponent.cpp 4 additions, 24 deletionscomponents/V4L2DecodeComponent.cpp
- components/V4L2EncodeComponent.cpp 12 additions, 4 deletionscomponents/V4L2EncodeComponent.cpp
- components/include/v4l2_codec2/components/V4L2DecodeComponent.h 0 additions, 3 deletions...ents/include/v4l2_codec2/components/V4L2DecodeComponent.h
Loading