[vlmc-devel] MLTTrack: Fix wrong blank length after a clip is resized
Yikai Lu
git at videolan.org
Fri Aug 12 16:52:29 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Mon Aug 8 19:15:13 2016 -0500| [9281948be7f5ecf5f680d9803dd75f135b5aa1ff] | committer: Yikai Lu
MLTTrack: Fix wrong blank length after a clip is resized
> https://code.videolan.org/videolan/vlmc/commit/9281948be7f5ecf5f680d9803dd75f135b5aa1ff
---
src/Backend/MLT/MLTTrack.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/Backend/MLT/MLTTrack.cpp b/src/Backend/MLT/MLTTrack.cpp
index 9befce6..9660a60 100644
--- a/src/Backend/MLT/MLTTrack.cpp
+++ b/src/Backend/MLT/MLTTrack.cpp
@@ -133,7 +133,13 @@ MLTTrack::clipAt( int64_t position ) const
bool
MLTTrack::resizeClip( int clip, int64_t begin, int64_t end )
{
- return !playlist()->resize_clip( clip, (int)begin, (int)end );
+ auto oldEnd = playlist()->get_clip( clip )->get_out();
+ auto ret = playlist()->resize_clip( clip, (int)begin, (int)end );
+ if ( !ret && (int)end < oldEnd )
+ {
+ playlist()->insert_blank( clip + 1, oldEnd - end - 1 );
+ }
+ return !ret;
}
int
More information about the Vlmc-devel
mailing list