summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
authorRajneesh Chowdury <rajneeshc@google.com>2011-09-14 15:38:07 -0700
committerRajneesh Chowdury <rajneeshc@google.com>2011-09-14 15:38:07 -0700
commit276adbc8cab51c5cd60906fdbff9c7d5345ad0a6 (patch)
treea60a3f5484e24d5aab6c41172657d812543a7727 /libvideoeditor
parent816cd5ae8896f4965b2f1a5ea72d59dcac7257cb (diff)
downloadframeworks_av-276adbc8cab51c5cd60906fdbff9c7d5345ad0a6.zip
frameworks_av-276adbc8cab51c5cd60906fdbff9c7d5345ad0a6.tar.gz
frameworks_av-276adbc8cab51c5cd60906fdbff9c7d5345ad0a6.tar.bz2
Fix for bug 5255159 Cannot play exported movie from Movie Studio
Ensure video encoder is not created and destroyed for every clip. Change-Id: I7a1d525e7bcdc839acc39d43e5046207c2d3b44f
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-xlibvideoeditor/vss/src/M4VSS3GPP_Edit.c15
-rwxr-xr-xlibvideoeditor/vss/src/M4VSS3GPP_EditVideo.c18
2 files changed, 10 insertions, 23 deletions
diff --git a/libvideoeditor/vss/src/M4VSS3GPP_Edit.c b/libvideoeditor/vss/src/M4VSS3GPP_Edit.c
index b764fef..d9330f5 100755
--- a/libvideoeditor/vss/src/M4VSS3GPP_Edit.c
+++ b/libvideoeditor/vss/src/M4VSS3GPP_Edit.c
@@ -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 */
diff --git a/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c b/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c
index 1667155..b5e79e9 100755
--- a/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c
+++ b/libvideoeditor/vss/src/M4VSS3GPP_EditVideo.c
@@ -884,15 +884,17 @@ static M4OSA_ERR M4VSS3GPP_intCheckVideoMode(
&& pC->bIsMMS == M4OSA_FALSE )
{
/**
- * Create the encoder */
- err = M4VSS3GPP_intCreateVideoEncoder(pC);
+ * 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);
- return err;
+ if( M4NO_ERROR != err )
+ {
+ M4OSA_TRACE1_1(
+ "M4VSS3GPP_intCheckVideoMode: M4VSS3GPP_intCreateVideoEncoder \
+ returns 0x%x!", err);
+ return err;
+ }
}
}
else if( pC->bIsMMS == M4OSA_TRUE && pC->ewc.pEncContext == M4OSA_NULL )