And again keep this copy of our internal sources in sync, so much fun...
Change-Id: I4b588f14ba2d06d3163615557fd97fc2a5f6ca47
related-to-bug: 3375737
diff --git a/libvideoeditor/lvpp/PreviewPlayer.cpp b/libvideoeditor/lvpp/PreviewPlayer.cpp
index 617a1b6..8a3576c 100644
--- a/libvideoeditor/lvpp/PreviewPlayer.cpp
+++ b/libvideoeditor/lvpp/PreviewPlayer.cpp
@@ -434,7 +434,7 @@
mTimeSourceDeltaUs = 0;
mVideoTimeUs = 0;
- mSeeking = false;
+ mSeeking = NO_SEEK;
mSeekNotificationSent = false;
mSeekTimeUs = 0;
@@ -903,7 +903,7 @@
TimeSource *ts_st = &mSystemTimeSource;
int64_t timeStartUs = ts_st->getRealTimeUs();
- if (mSeeking) {
+ if (mSeeking != NO_SEEK) {
if (mLastVideoBuffer) {
mLastVideoBuffer->release();
mLastVideoBuffer = NULL;
@@ -930,7 +930,7 @@
if (!mVideoBuffer) {
MediaSource::ReadOptions options;
- if (mSeeking) {
+ if (mSeeking != NO_SEEK) {
LOGV("LV PLAYER seeking to %lld us (%.2f secs)", mSeekTimeUs,
mSeekTimeUs / 1E6);
@@ -963,7 +963,7 @@
}
// So video playback is complete, but we may still have
// a seek request pending that needs to be applied to the audio track
- if (mSeeking) {
+ if (mSeeking != NO_SEEK) {
LOGV("video stream ended while seeking!");
}
finishSeekIfNecessary(-1);
@@ -989,7 +989,7 @@
int64_t videoTimeUs;
CHECK(mVideoBuffer->meta_data()->findInt64(kKeyTime, &videoTimeUs));
- if (mSeeking) {
+ if (mSeeking != NO_SEEK) {
if (videoTimeUs < mSeekTimeUs) {
// buffers are before seek time
// ignore them
@@ -1032,7 +1032,7 @@
}
}
- bool wasSeeking = mSeeking;
+ SeekType wasSeeking = mSeeking;
finishSeekIfNecessary(timeUs);
if (mAudioPlayer != NULL && !(mFlags & (AUDIO_RUNNING))) {
status_t err = startAudioPlayer_l();
@@ -1067,7 +1067,7 @@
int64_t latenessUs = nowUs - timeUs;
- if (wasSeeking) {
+ if (wasSeeking != NO_SEEK) {
// Let's display the first frame after seeking right away.
latenessUs = 0;
}
@@ -1236,7 +1236,7 @@
postStreamDoneEvent_l(ERROR_END_OF_STREAM);
}
else {
- if (wasSeeking && (mFlags & SEEK_PREVIEW)) {
+ if ((wasSeeking != NO_SEEK) && (mFlags & SEEK_PREVIEW)) {
mFlags &= ~SEEK_PREVIEW;
return;
}
@@ -1932,7 +1932,7 @@
if (!mVideoBuffer) {
MediaSource::ReadOptions options;
- if (mSeeking) {
+ if (mSeeking != NO_SEEK) {
LOGV("LV PLAYER seeking to %lld us (%.2f secs)", mSeekTimeUs,
mSeekTimeUs / 1E6);
@@ -1981,7 +1981,7 @@
int64_t videoTimeUs;
CHECK(mVideoBuffer->meta_data()->findInt64(kKeyTime, &videoTimeUs));
- if (mSeeking) {
+ if (mSeeking != NO_SEEK) {
if (videoTimeUs < mSeekTimeUs) {
// buffers are before seek time
// ignore them