diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2013-02-25 02:08:46 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2013-02-25 02:08:46 -0800 |
| commit | 4a32e77ee4340a6fabd687cced7e63d9493974ef (patch) | |
| tree | 789a35e86cbd5b39b6ea99474ffcc65948a2d546 | |
| parent | 71b29e12f18938213fab357e4be2f8cb5b29bbc6 (diff) | |
| parent | 5a20858dcfc0757f5b0b6956980f8bd424666d53 (diff) | |
| download | android_hardware_qcom_media-4a32e77ee4340a6fabd687cced7e63d9493974ef.tar.gz android_hardware_qcom_media-4a32e77ee4340a6fabd687cced7e63d9493974ef.tar.bz2 android_hardware_qcom_media-4a32e77ee4340a6fabd687cced7e63d9493974ef.zip | |
Merge "DashPlayer: Following fixes are added in DashPlayer"
| -rw-r--r-- | dashplayer/DashPlayer.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/dashplayer/DashPlayer.cpp b/dashplayer/DashPlayer.cpp index d55251f6..f5073b1d 100644 --- a/dashplayer/DashPlayer.cpp +++ b/dashplayer/DashPlayer.cpp @@ -556,7 +556,12 @@ void DashPlayer::onMessageReceived(const sp<AMessage> &msg) { if ((mAudioEOS || mAudioDecoder == NULL) && (mVideoEOS || mVideoDecoder == NULL)) { - notifyListener(MEDIA_PLAYBACK_COMPLETE, 0, 0); + if ((mSourceType == kHttpDashSource) && + (finalResult == ERROR_END_OF_STREAM)) { + notifyListener(MEDIA_PLAYBACK_COMPLETE, 0, 0); + } else if (mSourceType != kHttpDashSource) { + notifyListener(MEDIA_PLAYBACK_COMPLETE, 0, 0); + } } } else if (what == Renderer::kWhatPosition) { int64_t positionUs; @@ -805,7 +810,6 @@ void DashPlayer::onMessageReceived(const sp<AMessage> &msg) { break; } if (mSource->isPrepareDone()) { - notifyListener(MEDIA_PREPARED, 0, 0); int64_t durationUs; if (mDriver != NULL && mSource->getDuration(&durationUs) == OK) { sp<DashPlayerDriver> driver = mDriver.promote(); @@ -813,6 +817,7 @@ void DashPlayer::onMessageReceived(const sp<AMessage> &msg) { driver->notifyDuration(durationUs); } } + notifyListener(MEDIA_PREPARED, 0, 0); } else { msg->post(100000ll); } |
