summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/VideoUtils.java
diff options
context:
space:
mode:
authorxiaoqiny <quic_xiaoqiny@codeaurora.org>2014-04-03 17:23:12 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2015-01-30 11:17:45 -0800
commit49ce6546e4484cbd5e64b8a9f401f62358b01dc7 (patch)
treea9051a722acdb0bb74b849fa35361bb52976b20e /src/com/android/gallery3d/app/VideoUtils.java
parente17d7a4d93c2d56ef21b67ae555cd8df3b352bae (diff)
downloadandroid_packages_apps_Gallery2-49ce6546e4484cbd5e64b8a9f401f62358b01dc7.tar.gz
android_packages_apps_Gallery2-49ce6546e4484cbd5e64b8a9f401f62358b01dc7.tar.bz2
android_packages_apps_Gallery2-49ce6546e4484cbd5e64b8a9f401f62358b01dc7.zip
Gallery2: Fix force close issue when mute some videos
- catch exception when failed to mute video Change-Id: Ib0901e9f27bdfb0b06f7a8968ca5bcffad63578d CRs-Fixed: 641477
Diffstat (limited to 'src/com/android/gallery3d/app/VideoUtils.java')
-rwxr-xr-x[-rw-r--r--]src/com/android/gallery3d/app/VideoUtils.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/app/VideoUtils.java b/src/com/android/gallery3d/app/VideoUtils.java
index 76d5d1e02..4f551a67d 100644..100755
--- a/src/com/android/gallery3d/app/VideoUtils.java
+++ b/src/com/android/gallery3d/app/VideoUtils.java
@@ -226,6 +226,11 @@ public class VideoUtils {
} catch (IllegalStateException e) {
// Swallow the exception due to malformed source.
Log.w(LOGTAG, "The source video file is malformed");
+ File f = new File(dstPath);
+ if (f.exists()) {
+ f.delete();
+ }
+ throw e;
} finally {
muxer.release();
}