diff options
author | Rajneesh Chowdury <rajneeshc@google.com> | 2011-03-14 12:04:31 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-03-14 12:04:31 -0700 |
commit | b6b87f50e929c1c821f2f0ea5a31951e6cd76919 (patch) | |
tree | dbae581ef1080c255de5a2925eb315d5af897790 | |
parent | 2cdb2152dce736f79e5f514dd53d5a5e99a6f8e2 (diff) | |
parent | 9a8c9a848da5a4a06c5402d6716efa66b8818d37 (diff) | |
download | frameworks_av-b6b87f50e929c1c821f2f0ea5a31951e6cd76919.zip frameworks_av-b6b87f50e929c1c821f2f0ea5a31951e6cd76919.tar.gz frameworks_av-b6b87f50e929c1c821f2f0ea5a31951e6cd76919.tar.bz2 |
am a60cb935: Fix for 4084134 End transition applied on image does not show up in previewer when playback
* commit 'a60cb935edd049ecf4c7ee985d562fff6c703372':
Fix for 4084134 End transition applied on image does not show up in previewer when playback
-rw-r--r-- | libvideoeditor/lvpp/PreviewPlayer.cpp | 17 |
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) { |