Merge "Fix for issue 3427268 Crash when stopping playback"
diff --git a/libvideoeditor/lvpp/PreviewPlayer.cpp b/libvideoeditor/lvpp/PreviewPlayer.cpp
index 821c8de..e655daa 100644
--- a/libvideoeditor/lvpp/PreviewPlayer.cpp
+++ b/libvideoeditor/lvpp/PreviewPlayer.cpp
@@ -1120,6 +1120,8 @@
mFlags |= AUDIO_AT_EOS;
LOGV("PreviewPlayer: onVideoEvent timeUs > mPlayEndTime; send EOS..");
mOverlayUpdateEventPosted = false;
+ // Set the last decoded timestamp to duration
+ mDecodedVideoTs = (mPlayEndTimeMsec*1000);
postStreamDoneEvent_l(ERROR_END_OF_STREAM);
return;
}
@@ -1238,6 +1240,8 @@
mFlags |= VIDEO_AT_EOS;
mFlags |= AUDIO_AT_EOS;
mOverlayUpdateEventPosted = false;
+ // Set the last decoded timestamp to duration
+ mDecodedVideoTs = (mPlayEndTimeMsec*1000);
postStreamDoneEvent_l(ERROR_END_OF_STREAM);
}
else {