summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@android.com>2013-03-15 08:57:10 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-15 08:57:10 -0700
commit3550ebddf61e00a5b328b4fe5709c16a8b74b273 (patch)
tree281f28d30061d682158ef08185aff3e6ecad924a /libvideoeditor
parent1abb9facbbc91c8df629d9b740002d749bc5c2bc (diff)
parent8f418ef50de8aaf784a932ab4a55bef5df1c4f4d (diff)
downloadframeworks_av-3550ebddf61e00a5b328b4fe5709c16a8b74b273.zip
frameworks_av-3550ebddf61e00a5b328b4fe5709c16a8b74b273.tar.gz
frameworks_av-3550ebddf61e00a5b328b4fe5709c16a8b74b273.tar.bz2
am f0cea9f8: Merge "Prevent invalid frame durations"
* commit 'f0cea9f83cf0c8e5ecdd2b401ec2d56d0c717708': Prevent invalid frame durations
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! */