summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libstagefright/AwesomePlayer.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index e65c943..0bc4062 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -762,6 +762,13 @@ status_t AwesomePlayer::play_l() {
bool deferredAudioSeek = false;
+ if (mDecryptHandle != NULL) {
+ int64_t position;
+ getPosition(&position);
+ mDrmManagerClient->setPlaybackStatus(mDecryptHandle,
+ Playback::START, position / 1000);
+ }
+
if (mAudioSource != NULL) {
if (mAudioPlayer == NULL) {
if (mAudioSink != NULL) {
@@ -779,6 +786,11 @@ status_t AwesomePlayer::play_l() {
mFlags &= ~(PLAYING | FIRST_FRAME);
+ if (mDecryptHandle != NULL) {
+ mDrmManagerClient->setPlaybackStatus(mDecryptHandle,
+ Playback::STOP, 0);
+ }
+
return err;
}
@@ -815,13 +827,6 @@ status_t AwesomePlayer::play_l() {
seekTo_l(0);
}
- if (mDecryptHandle != NULL) {
- int64_t position;
- getPosition(&position);
- mDrmManagerClient->setPlaybackStatus(mDecryptHandle,
- Playback::START, position / 1000);
- }
-
return OK;
}