diff options
author | Santosh Madhava <smadhava@google.com> | 2011-02-11 20:28:45 -0800 |
---|---|---|
committer | Santosh Madhava <smadhava@google.com> | 2011-02-14 11:12:17 -0800 |
commit | 4ca3e5df4b809210b240cd7d0489922017d87a6d (patch) | |
tree | f227d4c1928fd79c80f2e11937bce57a337a5e1f /libvideoeditor/lvpp | |
parent | a14f40684961771d656ff88cce7c2b758511e92f (diff) | |
download | frameworks_av-4ca3e5df4b809210b240cd7d0489922017d87a6d.zip frameworks_av-4ca3e5df4b809210b240cd7d0489922017d87a6d.tar.gz frameworks_av-4ca3e5df4b809210b240cd7d0489922017d87a6d.tar.bz2 |
Fix for issue 3431967 : Memory leak from video editor engine
Cleanup
Change-Id: Ie5432de17c30dbb02c70a759502b7f2e2dbba447
Diffstat (limited to 'libvideoeditor/lvpp')
-rw-r--r-- | libvideoeditor/lvpp/PreviewPlayer.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libvideoeditor/lvpp/PreviewPlayer.cpp b/libvideoeditor/lvpp/PreviewPlayer.cpp index 8a75119..d0b84d8 100644 --- a/libvideoeditor/lvpp/PreviewPlayer.cpp +++ b/libvideoeditor/lvpp/PreviewPlayer.cpp @@ -575,6 +575,7 @@ status_t PreviewPlayer::play_l() { MediaBuffer *aLocalBuffer; options.setSeekTo(mSeekTimeUs); mVideoSource->read(&aLocalBuffer, &options); + aLocalBuffer->release(); } if (mVideoSource != NULL) { @@ -823,8 +824,9 @@ void PreviewPlayer::onVideoEvent() { if (mVideoRenderer != NULL) { mVideoRendererIsPreview = false; err = initRenderer_l(); - if ( err != OK ) - postStreamDoneEvent_l(err); // santosh + if (err != OK) { + postStreamDoneEvent_l(err); + } } continue; @@ -955,8 +957,9 @@ void PreviewPlayer::onVideoEvent() { mVideoRendererIsPreview = false; status_t err = initRenderer_l(); - if ( err != OK ) - postStreamDoneEvent_l(err); // santosh + if (err != OK) { + postStreamDoneEvent_l(err); + } } // If timestamp exceeds endCutTime of clip, donot render @@ -1811,8 +1814,9 @@ status_t PreviewPlayer::readFirstVideoFrame() { if (mVideoRenderer != NULL) { mVideoRendererIsPreview = false; err = initRenderer_l(); - if ( err != OK ) - postStreamDoneEvent_l(err); // santosh + if (err != OK) { + postStreamDoneEvent_l(err); + } } continue; } |