[datatype-dev] Re: CR:Fixes bug with rolling in mp4 writer.
Jamie Gordon jgordon at real.comok
On 2/15/2011 10:32 AM, Sujeet Kharkar wrote:
> Synopsis
> ========
> Fixes bug with rolling.
> Suggested Reviewer:Jamie
>
> Branches: PRODUCER_14_0_RN and HEAD
>
> Description
> ===========
> I was not checking if have already received a keyframe before saving
> initial keyframe's timestamp.
>
> Files affected
> ==============
> datatype/mp4/filewriter/mp4sm.cpp
>
> Tested
> ======
> Tested with multi-rate encode.
>
> QA hints
> =========
> None
>
> Index: mp4sm.cpp
> ===================================================================
> RCS file: /cvsroot/datatype/mp4/filewriter/mp4sm.cpp,v
> retrieving revision 1.32.2.4
> diff -u -w -r1.32.2.4 mp4sm.cpp
> --- mp4sm.cpp 8 Feb 2011 19:09:55 -0000 1.32.2.4
> +++ mp4sm.cpp 15 Feb 2011 18:24:18 -0000
> @@ -1144,7 +1144,8 @@
>
> if (m_bSavePacketsForRolling)
> {
> - if
> (m_pStreamInfo[uiStreamNo].m_pStblManager->IsKeyFrame(pPacket))
> + if
> (!m_pStreamInfo[uiStreamNo].m_bKeyFrameForRollReceived&&
> +
> m_pStreamInfo[uiStreamNo].m_pStblManager->IsKeyFrame(pPacket))
> {
> //If Is key frame and if Audio then it's timestamp
> has to be> video keyframe's timestamp.(In case audio
> //is behind audio we will wait for it to catch up
> before rolling.)