Index: media/base/android/media_source_player.cc |
diff --git a/media/base/android/media_source_player.cc b/media/base/android/media_source_player.cc |
index 830defae1946145be6163e69e1f4eb59d3939bde..8306ad969b1a5eed27c7ba584c2db7322ad98260 100644 |
--- a/media/base/android/media_source_player.cc |
+++ b/media/base/android/media_source_player.cc |
@@ -194,6 +194,7 @@ void MediaSourcePlayer::Release() { |
playing_ = false; |
decoder_starvation_callback_.Cancel(); |
+ DetachListener(); |
} |
void MediaSourcePlayer::SetVolume(double volume) { |
@@ -226,6 +227,7 @@ void MediaSourcePlayer::StartInternal() { |
// be clear (not encrypted) or encrypted with different keys. So |
// |is_waiting_for_key_| condition may not be true anymore. |
is_waiting_for_key_ = false; |
+ AttachListener(NULL); |
SetPendingEvent(PREFETCH_REQUEST_EVENT_PENDING); |
ProcessPendingEvents(); |