| Index: content/renderer/media/android/webmediaplayer_android.cc
|
| diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
|
| index 4c6b4aad89b8d8639dfc62e8a34040669af21202..7ebcd990061c1c48bef9fdafde6b320f2ed38252 100644
|
| --- a/content/renderer/media/android/webmediaplayer_android.cc
|
| +++ b/content/renderer/media/android/webmediaplayer_android.cc
|
| @@ -162,8 +162,10 @@ WebMediaPlayerAndroid::~WebMediaPlayerAndroid() {
|
| if (proxy_)
|
| proxy_->DestroyPlayer(player_id_);
|
|
|
| - if (stream_id_)
|
| - stream_texture_factory_->DestroyStreamTexture(texture_id_);
|
| + if (stream_id_) {
|
| + DCHECK(texture_id_);
|
| + stream_texture_factory_->DestroyStreamTexture(stream_id_, texture_id_);
|
| + }
|
|
|
| if (manager_)
|
| manager_->UnregisterMediaPlayer(player_id_);
|
| @@ -784,7 +786,8 @@ void WebMediaPlayerAndroid::WillDestroyCurrentMessageLoop() {
|
|
|
| void WebMediaPlayerAndroid::Detach() {
|
| if (stream_id_) {
|
| - stream_texture_factory_->DestroyStreamTexture(texture_id_);
|
| + DCHECK(texture_id_);
|
| + stream_texture_factory_->DestroyStreamTexture(stream_id_, texture_id_);
|
| stream_id_ = 0;
|
| }
|
|
|
| @@ -852,7 +855,8 @@ void WebMediaPlayerAndroid::EstablishSurfaceTexturePeer() {
|
| if (media_source_delegate_ && stream_texture_factory_) {
|
| // MediaCodec will release the old surface when it goes away, we need to
|
| // recreate a new one each time this is called.
|
| - stream_texture_factory_->DestroyStreamTexture(texture_id_);
|
| + DCHECK(stream_id_ && texture_id_);
|
| + stream_texture_factory_->DestroyStreamTexture(stream_id_, texture_id_);
|
| stream_id_ = 0;
|
| texture_id_ = 0;
|
| texture_mailbox_ = gpu::Mailbox();
|
|
|