From 5350066763a35bbaf5b5f15f3f1680ec73852961 Mon Sep 17 00:00:00 2001 From: beanz Date: Fri, 16 Nov 2012 13:47:50 +0800 Subject: 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 --- .../vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libvideoeditor') diff --git a/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp b/libvideoeditor/vss/stagefrightshells/src/VideoEditorVideoDecoder.cpp index 21d3c30..de91731 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 */ -- cgit v1.1