From c78f4380f946b3811fe393dabf0941f5e7615664 Mon Sep 17 00:00:00 2001 From: Gloria Wang Date: Tue, 22 Feb 2011 10:56:56 -0800 Subject: [PATCH] To return correct status in WVMMediaSource::start() and WVMMediaSource::stop() Change-Id: I09db9ba58a4e375128bb3b60bd375b887e11ac05 --- proprietary/wvm/WVMMediaSource.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proprietary/wvm/WVMMediaSource.cpp b/proprietary/wvm/WVMMediaSource.cpp index 71ea2c0c..b775cbd2 100644 --- a/proprietary/wvm/WVMMediaSource.cpp +++ b/proprietary/wvm/WVMMediaSource.cpp @@ -87,6 +87,7 @@ status_t WVMMediaSource::start(MetaData *) WVStatus result = WV_Play(mSession, 1.0, &speed, "now-"); if (result != WV_Status_OK) { LOGE("WV_Play returned status %d in WVMMediaSource::start\n", result); + return ERROR_IO; } } return OK; @@ -100,11 +101,14 @@ status_t WVMMediaSource::stop() CHECK(mStarted); + status_t status = OK; + // Let video stream control play/pause if (mESSelector == WV_EsSelector_Video) { WVStatus result = WV_Pause(mSession, "now"); if (result != WV_Status_OK) { LOGE("WV_Pause returned status %d in WVMMediaSource::stop\n", result); + status = ERROR_IO; } } @@ -113,7 +117,7 @@ status_t WVMMediaSource::stop() mStarted = false; - return OK; + return status; } sp WVMMediaSource::getFormat()