Remove unused mLastVideoBuffer and bAppliedVideoEffect.
Change-Id: I29511aaa714494a1a6caa4ed95bbc26370b37246
diff --git a/libvideoeditor/lvpp/PreviewPlayer.cpp b/libvideoeditor/lvpp/PreviewPlayer.cpp
index 0f04c0a..78ca1cd 100755
--- a/libvideoeditor/lvpp/PreviewPlayer.cpp
+++ b/libvideoeditor/lvpp/PreviewPlayer.cpp
@@ -81,7 +81,6 @@
mFrameYUVBuffer(NULL){
mVideoRenderer = NULL;
- mLastVideoBuffer = NULL;
mEffectsSettings = NULL;
mVeAudioPlayer = NULL;
mAudioMixStoryBoardTS = 0;
@@ -304,11 +303,6 @@
//delete mAudioPlayer;
mAudioPlayer = NULL;
- if (mLastVideoBuffer) {
- mLastVideoBuffer->release();
- mLastVideoBuffer = NULL;
- }
-
if (mVideoBuffer) {
mVideoBuffer->release();
mVideoBuffer = NULL;
@@ -795,7 +789,6 @@
void PreviewPlayer::onVideoEvent() {
uint32_t i=0;
- bool bAppliedVideoEffect = false;
M4OSA_ERR err1 = M4NO_ERROR;
int64_t imageFrameTimeUs = 0;
@@ -816,11 +809,6 @@
int64_t timeStartUs = ts_st->getRealTimeUs();
if (mSeeking != NO_SEEK) {
- if (mLastVideoBuffer) {
- mLastVideoBuffer->release();
- mLastVideoBuffer = NULL;
- }
-
if(mAudioSource != NULL) {
@@ -1016,11 +1004,7 @@
// If timestamp exceeds endCutTime of clip, donot render
if((timeUs/1000) > mPlayEndTimeMsec) {
- if (mLastVideoBuffer) {
- mLastVideoBuffer->release();
- mLastVideoBuffer = NULL;
- }
- mLastVideoBuffer = mVideoBuffer;
+ mVideoBuffer->release();
mVideoBuffer = NULL;
mFlags |= VIDEO_AT_EOS;
mFlags |= AUDIO_AT_EOS;
@@ -1102,14 +1086,9 @@
err1 = doVideoPostProcessing();
if(err1 != M4NO_ERROR) {
LOGE("doVideoPostProcessing returned err");
- bAppliedVideoEffect = false;
- }
- else {
- bAppliedVideoEffect = true;
}
}
else {
- bAppliedVideoEffect = false;
if(mRenderingMode != MEDIA_RENDERING_INVALID) {
// No effects to be applied, but media rendering to be done
err1 = doMediaRendering();
@@ -1126,12 +1105,7 @@
mVideoRenderer->renderYV12();
}
- if (mLastVideoBuffer) {
- mLastVideoBuffer->release();
- mLastVideoBuffer = NULL;
- }
-
- mLastVideoBuffer = mVideoBuffer;
+ mVideoBuffer->release();
mVideoBuffer = NULL;
// Post progress callback based on callback interval set