Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11e580af authored by Rajneesh Chowdury's avatar Rajneesh Chowdury
Browse files

DO NOT MERGE - Fix for bug 5255159 Cannot play exported movie from Movie Studio

Ensure video encoder is not created and destroyed for every clip.

Change-Id: I9ce4db9312af801570dd51f4b075f262e27e3952
parent 816cd5ae
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -2971,21 +2971,6 @@ static M4OSA_ERR M4VSS3GPP_intSwitchToNextClip(
        {
            /* if not a transition then reset previous video state */
            pC->Vstate = M4VSS3GPP_kEditVideoState_READ_WRITE;

            if( pC->bIsMMS == M4OSA_FALSE ) /* RC */
            {
                /* There may be an encoder to destroy */
                err = M4VSS3GPP_intDestroyVideoEncoder(pC);

                if( M4NO_ERROR != err )
                {
                    M4OSA_TRACE1_1(
                        "M4VSS3GPP_intSwitchToNextClip:\
                        M4VSS3GPP_editDestroyVideoEncoder() returns 0x%x!",
                        err);
                    return err;
                }
            }
        }
    }
    /* The flags are set to false at the beginning of every clip */
+10 −8
Original line number Diff line number Diff line
@@ -884,17 +884,19 @@ static M4OSA_ERR M4VSS3GPP_intCheckVideoMode(
        && pC->bIsMMS == M4OSA_FALSE )
    {
        /**
        * Create the encoder */
        * Create the encoder, if not created already*/
        if (pC->ewc.encoderState == M4VSS3GPP_kNoEncoder) {
            err = M4VSS3GPP_intCreateVideoEncoder(pC);

            if( M4NO_ERROR != err )
            {
                M4OSA_TRACE1_1(
                "M4VSS3GPP_intCheckVideoMode: M4VSS3GPP_intCreateVideoEncoder returns 0x%x!",
                err);
                    "M4VSS3GPP_intCheckVideoMode: M4VSS3GPP_intCreateVideoEncoder \
                     returns 0x%x!", err);
                return err;
            }
        }
    }
    else if( pC->bIsMMS == M4OSA_TRUE && pC->ewc.pEncContext == M4OSA_NULL )
    {
        /**