libstagefright: Fixing a race condition while stopping video playback.
While closing the video component, two threads hold the reference to OMXCodec - thread in which OMXCodec::stop is executed and the thread in which OMXCodec::on_message is executed. The thread which holds the last reference is the one in which OMXCodec's instance gets destroyed. We want client thread (OMXCodec::stop) to be the one destroying the instance. If onMessage destroys the instance then we might hit a situation where pthread_join is called on the same thread causing indefinite hang. Change-Id: I79ef4ce0b71a6bf9f10f7ee0821322d915fb67c5 CRs-fixed: 270937
Loading
Please register or sign in to comment