Notify an error occured during prefetching when StageFright
reports that a read error was encountered (other than EOS),
and stop playback.
Change-Id: I0c00ee76b148bd80a26679648322633d6e5533da
if (err != OK) {
if (err != ERROR_END_OF_STREAM) {
SL_LOGE("MediaSource::read returned error %d", err);
- // FIXME handle error
+ pause();
+ notifyPrepared(err);
+ return;
} else {
// handle notification and looping at end of stream
if (0 < mDurationUsec) {
mLastDecodedPositionUs = mDurationUsec;
}
reachedEndOfStream();
+ return;
}
- return;
}
// render