Merge "If media player has died already, do not dec the old surface texture reference. Otherwise segfault will occur. For bug 5327664. Do not merge." into ics-factoryrom
This commit is contained in:
@ -247,6 +247,11 @@ getVideoSurfaceTexture(JNIEnv* env, jobject thiz) {
|
||||
static void
|
||||
decVideoSurfaceRef(JNIEnv *env, jobject thiz)
|
||||
{
|
||||
sp<MediaPlayer> mp = getMediaPlayer(env, thiz);
|
||||
if (mp == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
sp<ISurfaceTexture> old_st = getVideoSurfaceTexture(env, thiz);
|
||||
if (old_st != NULL) {
|
||||
old_st->decStrong(thiz);
|
||||
|
Reference in New Issue
Block a user