commit | e7defc29750e5e201a5041d0fce1ffca9e305229 | [log] [tgz] |
---|---|---|
author | Rajneesh Chowdury <rajneeshc@google.com> | Thu Mar 10 10:35:42 2011 -0800 |
committer | Rajneesh Chowdury <rajneeshc@google.com> | Thu Mar 10 10:35:42 2011 -0800 |
tree | fe18d33e9a476f94bef3e53e4caaee59b60f5d98 | |
parent | 055a858562e04c903988d09973accc8aeeece02c [diff] |
Fix for 4080402 NPE in Transition.setDuration Change-Id: I1e4499e3191beafdaf9bb4b7fd51798bd1eab300
diff --git a/media/java/android/media/videoeditor/Transition.java b/media/java/android/media/videoeditor/Transition.java index 3e8fe94..fa9d26d 100755 --- a/media/java/android/media/videoeditor/Transition.java +++ b/media/java/android/media/videoeditor/Transition.java
@@ -131,6 +131,11 @@ if (durationMs > getMaximumDuration()) { throw new IllegalArgumentException("The duration is too large"); } + if (afterMediaItem != null) { + mNativeHelper = afterMediaItem.getNativeContext(); + }else { + mNativeHelper = beforeMediaItem.getNativeContext(); + } } /**
diff --git a/media/java/android/media/videoeditor/TransitionAlpha.java b/media/java/android/media/videoeditor/TransitionAlpha.java index f7d17cb..22788d4 100755 --- a/media/java/android/media/videoeditor/TransitionAlpha.java +++ b/media/java/android/media/videoeditor/TransitionAlpha.java
@@ -104,13 +104,6 @@ mWidth = dbo.outWidth; mHeight = dbo.outHeight; - if (afterMediaItem != null) { - mNativeHelper = afterMediaItem.getNativeContext(); - }else { - mNativeHelper = beforeMediaItem.getNativeContext(); - } - - mRGBMaskFile = String.format(mNativeHelper.getProjectPath() + "/" + "mask" + transitionId+ ".rgb");