Fix an intermittent issue with HLS live streaming
An uninitialized return code was causing intermittent playback failure during Widevine HLS live playback Change-Id: Ib45176e7f91e2b6ccf0eb4185c6d58d3be0229b4 related-to-bug: 6277231
This commit is contained in:
@@ -480,6 +480,10 @@ int64_t WVMExtractorImpl::getCachedDurationUs(status_t *finalStatus) {
|
|||||||
} else if (status != WV_Status_OK) {
|
} else if (status != WV_Status_OK) {
|
||||||
*finalStatus = ERROR_IO;
|
*finalStatus = ERROR_IO;
|
||||||
} else {
|
} else {
|
||||||
|
if (mIsLiveStream)
|
||||||
|
*finalStatus = ERROR_END_OF_STREAM;
|
||||||
|
else
|
||||||
|
*finalStatus = OK;
|
||||||
durationUs = (uint64_t)(secondsBuffered * 1000000LL);
|
durationUs = (uint64_t)(secondsBuffered * 1000000LL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -345,9 +345,11 @@ status_t WVMMediaSource::read(MediaBuffer **buffer, const ReadOptions *options)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef REQUIRE_SECURE_BUFFERS
|
#ifdef REQUIRE_SECURE_BUFFERS
|
||||||
|
if (!mIsLiveStream) {
|
||||||
ALOGD("buffer overflow");
|
ALOGD("buffer overflow");
|
||||||
mediaBuf->release();
|
mediaBuf->release();
|
||||||
return ERROR_IO;
|
return ERROR_IO;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//ALOGD("Resizing...");
|
//ALOGD("Resizing...");
|
||||||
|
|||||||
Reference in New Issue
Block a user