diff options
author | Glenn Kasten <gkasten@android.com> | 2013-03-15 08:59:38 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-03-15 08:59:38 -0700 |
commit | 888498ec8f3c01e39bf0b202fbd926725d9d54a1 (patch) | |
tree | daf97dee9867a4fb37edde3a2f507c12eb7798e7 /libvideoeditor | |
parent | 7d02488e0af9f21f5f15abcbd8dd8746606a124c (diff) | |
parent | c44a3ae2704af52c0f4ea006b5b02a53b6df6c46 (diff) | |
download | frameworks_av-888498ec8f3c01e39bf0b202fbd926725d9d54a1.zip frameworks_av-888498ec8f3c01e39bf0b202fbd926725d9d54a1.tar.gz frameworks_av-888498ec8f3c01e39bf0b202fbd926725d9d54a1.tar.bz2 |
am c44a3ae2: am f0cea9f8: Merge "Prevent invalid frame durations"
* commit 'c44a3ae2704af52c0f4ea006b5b02a53b6df6c46':
Prevent invalid frame durations
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-x | libvideoeditor/vss/3gpwriter/src/M4MP4W_Writer.c | 6 |
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! */ |