Http streaming cannot play video whose duration is less than 5s

onPollBuffering() monitors EOS(finalStatus == ERROR_END_OF_STREAM),
then notifyPreparedAndCleanup(finalStatus) notifies prepared error.

Previous Google's patch "GenericSource: fix error handling during
preparing or rebuffering" should focus on error except ERROR_END_OF_STREAM.

Bug: 134911527
Test: http streaming can play a mp4 video whose duration is less than 5s
Change-Id: I5c738bbe7242314b24463679b5bd996ab59d2b04
(cherry picked from commit 89703072ec4edf7a384ec07024debc0a6e085ae0)
gugelfrei
Yuxiu Zhang 5 years ago committed by Andrew Lewis
parent 2cbc7cd807
commit 6efc14faf6

@ -1578,7 +1578,7 @@ void NuPlayer::GenericSource::onPollBuffering() {
}
if (mPreparing) {
notifyPreparedAndCleanup(finalStatus);
notifyPreparedAndCleanup(finalStatus == ERROR_END_OF_STREAM ? OK : finalStatus);
mPreparing = false;
} else if (mSentPauseOnBuffering) {
sendCacheStats();

Loading…
Cancel
Save