summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajneesh Chowdury <rajneeshc@google.com>2011-03-11 14:02:47 -0800
committerRajneesh Chowdury <rajneeshc@google.com>2011-03-11 17:47:35 -0800
commit9a8c9a848da5a4a06c5402d6716efa66b8818d37 (patch)
treec4a0b0e1d3d9e92b42b02c819664d8ebff3b8ecf
parent1dd524b567ef1bb0591eb8adce10d43841376f5d (diff)
downloadframeworks_av-9a8c9a848da5a4a06c5402d6716efa66b8818d37.zip
frameworks_av-9a8c9a848da5a4a06c5402d6716efa66b8818d37.tar.gz
frameworks_av-9a8c9a848da5a4a06c5402d6716efa66b8818d37.tar.bz2
Fix for 4084134 End transition applied on image does not show up in previewer when playback
Change-Id: I72ee9fe95f038c07b6ccfe3305aa6436e882eedf
-rw-r--r--libvideoeditor/lvpp/PreviewPlayer.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/libvideoeditor/lvpp/PreviewPlayer.cpp b/libvideoeditor/lvpp/PreviewPlayer.cpp
index e655daa..51ad51a 100644
--- a/libvideoeditor/lvpp/PreviewPlayer.cpp
+++ b/libvideoeditor/lvpp/PreviewPlayer.cpp
@@ -511,9 +511,24 @@ status_t PreviewPlayer::setAudioPlayer(AudioPlayer *audioPlayer) {
return OK;
}
+ // If new video source is not dummy, then always change source
+ // Else audio player continues using old audio source and there are
+ // frame drops to maintain AV sync
+ sp<MetaData> meta;
+ if (mVideoSource != NULL) {
+ meta = mVideoSource->getFormat();
+ const char *pVidSrcType;
+ if (meta->findCString(kKeyDecoderComponent, &pVidSrcType)) {
+ if (strcmp(pVidSrcType, "DummyVideoSource") != 0) {
+ LOGV(" Video clip with silent audio; need to change source");
+ return OK;
+ }
+ }
+ }
+
const char *pSrcType1;
const char *pSrcType2;
- sp<MetaData> meta = anAudioSource->getFormat();
+ meta = anAudioSource->getFormat();
if (meta->findCString(kKeyDecoderComponent, &pSrcType1)) {
if (strcmp(pSrcType1, "DummyAudioSource") == 0) {