To return correct status in WVMMediaSource::start() and WVMMediaSource::stop()
Change-Id: I09db9ba58a4e375128bb3b60bd375b887e11ac05
This commit is contained in:
@@ -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<MetaData> WVMMediaSource::getFormat()
|
||||
|
||||
Reference in New Issue
Block a user