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-");
|
WVStatus result = WV_Play(mSession, 1.0, &speed, "now-");
|
||||||
if (result != WV_Status_OK) {
|
if (result != WV_Status_OK) {
|
||||||
LOGE("WV_Play returned status %d in WVMMediaSource::start\n", result);
|
LOGE("WV_Play returned status %d in WVMMediaSource::start\n", result);
|
||||||
|
return ERROR_IO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return OK;
|
return OK;
|
||||||
@@ -100,11 +101,14 @@ status_t WVMMediaSource::stop()
|
|||||||
|
|
||||||
CHECK(mStarted);
|
CHECK(mStarted);
|
||||||
|
|
||||||
|
status_t status = OK;
|
||||||
|
|
||||||
// Let video stream control play/pause
|
// Let video stream control play/pause
|
||||||
if (mESSelector == WV_EsSelector_Video) {
|
if (mESSelector == WV_EsSelector_Video) {
|
||||||
WVStatus result = WV_Pause(mSession, "now");
|
WVStatus result = WV_Pause(mSession, "now");
|
||||||
if (result != WV_Status_OK) {
|
if (result != WV_Status_OK) {
|
||||||
LOGE("WV_Pause returned status %d in WVMMediaSource::stop\n", result);
|
LOGE("WV_Pause returned status %d in WVMMediaSource::stop\n", result);
|
||||||
|
status = ERROR_IO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,7 +117,7 @@ status_t WVMMediaSource::stop()
|
|||||||
|
|
||||||
mStarted = false;
|
mStarted = false;
|
||||||
|
|
||||||
return OK;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp<MetaData> WVMMediaSource::getFormat()
|
sp<MetaData> WVMMediaSource::getFormat()
|
||||||
|
|||||||
Reference in New Issue
Block a user