summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbeanz <beanz@marvell.com>2012-11-16 13:47:50 +0800
committerbeanz <beanz@marvell.com>2012-11-16 13:47:50 +0800
commite41446b59f52d88eca57d4255ea7b07c528c3eee (patch)
tree857e083d71c3468da2c824c4f1d6b07301870f5e
parent33cf49b168a88a88167c46b01787a57b49cd875f (diff)
libvideoeditor: fix cannot show some thumbnails in storyboard or no frame display in PreviewRenderer surface after importing video
1. this is caused mFrameIntervalMs isn't assigned for use-software-codec case 2. without the assingment, some decoded frames will not be copied to the buffer queue of VideoEditorVideoDecoder Change-Id: I578954e38958ebac8f258300e60b8ddf60e50521 Signed-off-by: beanz <beanz@marvell.com>
-rwxr-xr-xlibvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
index 21d3c305..de917310 100755
--- a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
+++ b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp
@@ -1149,6 +1149,12 @@ M4OSA_ERR VideoEditorVideoSoftwareDecoder_create(M4OSA_Context *pContext,
pDecShellContext->mLastOutputCts = -1;
pDecShellContext->m_pDecBufferPool = M4OSA_NULL;
+ // Calculate the interval between two video frames.
+ if(pDecShellContext->m_pVideoStreamhandler->m_averageFrameRate > 0){
+ pDecShellContext->mFrameIntervalMs =
+ 1000.0 / pDecShellContext->m_pVideoStreamhandler->m_averageFrameRate;
+ }
+
/**
* StageFright graph building
*/