From 29226b23307069ed4b03d572b557285e223d3fad Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 15 May 2019 00:24:01 +0200 Subject: [PATCH 1/2] update mp4parser from 1.0.6 to 1.1.22 --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 7c3d8f3d2..74614c170 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,7 @@ dependencies { implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' // number of unread messages, // the one-letter circle for the contacts (when there is not avatar) and a white background. implementation 'com.google.zxing:core:3.2.1' // QR Code scanner - implementation 'com.googlecode.mp4parser:isoparser:1.0.6' // MP4 recoding in MP4Builder and related classes + implementation 'com.googlecode.mp4parser:isoparser:1.1.22' // MP4 recoding in MP4Builder and related classes implementation ('com.davemorrissey.labs:subsampling-scale-image-view:3.6.0') { // for the zooming on photos / media exclude group: 'com.android.support', module: 'support-annotations' } From 41e2def76f819d8ae929dbe6813c5cf34d8a790a Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 15 May 2019 00:35:27 +0200 Subject: [PATCH 2/2] skip insufficient pre-check of video-format --- .../securesms/video/recode/VideoRecoder.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/video/recode/VideoRecoder.java b/src/org/thoughtcrime/securesms/video/recode/VideoRecoder.java index fff96daf6..00e3848bf 100644 --- a/src/org/thoughtcrime/securesms/video/recode/VideoRecoder.java +++ b/src/org/thoughtcrime/securesms/video/recode/VideoRecoder.java @@ -701,10 +701,11 @@ public class VideoRecoder { List boxes = Path.getPaths(isoFile, "/moov/trak/"); TrackHeaderBox trackHeaderBox = null; - Box boxTest = Path.getPath(isoFile, "/moov/trak/mdia/minf/stbl/stsd/mp4a/"); - if (boxTest == null) { - return null; // non-mp4 - } + // if we find a video-track, we're just optimistic that the following recoding also works - + // if it fails, we know this then. + // older versions check before for paths as "/moov/trak/mdia/minf/stbl/stsd/mp4a/" + // (using Path.getPath()), however this is not sufficient, other paths as "moov/mvhd" + // are also valid and it is hard to maintain a list here. for (Box box : boxes) { TrackBox trackBox = (TrackBox) box;