summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
authorOla Andersson <ola3.andersson@sonymobile.com>2012-12-05 13:07:58 +0100
committerTakeshi Aimi <takeshi.aimi@sonymobile.com>2013-03-12 20:16:35 +0900
commit7c25b029dc9b195fe0c57f3d26ce58f2f83d6867 (patch)
tree281f28d30061d682158ef08185aff3e6ecad924a /libvideoeditor
parent1a76084dd8918533b00d76fbef15888742f752df (diff)
downloadframeworks_av-7c25b029dc9b195fe0c57f3d26ce58f2f83d6867.zip
frameworks_av-7c25b029dc9b195fe0c57f3d26ce58f2f83d6867.tar.gz
frameworks_av-7c25b029dc9b195fe0c57f3d26ce58f2f83d6867.tar.bz2
Prevent invalid frame durations
Prevent frame duration from being negative when exporting movie studio project Change-Id: I459fb243650c777c2b59d1094acc88c3a944bd81
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-xlibvideoeditor/vss/3gpwriter/src/M4MP4W_Writer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvideoeditor/vss/3gpwriter/src/M4MP4W_Writer.c b/libvideoeditor/vss/3gpwriter/src/M4MP4W_Writer.c
index 9ad94e0..cdfc441 100755
--- a/libvideoeditor/vss/3gpwriter/src/M4MP4W_Writer.c
+++ b/libvideoeditor/vss/3gpwriter/src/M4MP4W_Writer.c
@@ -2486,6 +2486,12 @@ M4OSA_ERR M4MP4W_processAU( M4OSA_Context context, M4SYS_StreamID streamID,
#endif
+ if ((M4MP4W_Time32)auPtr->CTS < mMp4FileDataPtr->videoTrackPtr->CommonData.lastCTS) {
+ // Do not report as error, it will abort the entire filewrite. Just skip this frame.
+ M4OSA_TRACE1_0("Skip frame. Video frame has too old timestamp.");
+ return M4NO_ERROR;
+ }
+
mMp4FileDataPtr->videoTrackPtr->currentPos += auPtr->size;
/* Warning: time conversion cast 64to32! */