Skip to content

Commit da44ff5

Browse files
committed
Fix crash caused by VideoMessage
1 parent 1d1f385 commit da44ff5

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed
0 Bytes
Binary file not shown.
-1.52 KB
Binary file not shown.

src/main/java/icu/jnet/whatsjava/messages/generic/WAVideoMessage.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public WAVideoMessage(WebMessageInfo message) {
3535
this.gifAttribution = videoMessage.getGifAttribution();
3636

3737
this.jpegMp4Thumbnail = videoMessage.getJpegThumbnail().toByteArray();
38-
this.mp4FullResolution = MediaEncryption.decrypt(mediaKey, url, MediaEncryption.MEDIA_TYPE_VIDEO);
38+
byte[] decryptedBytes = MediaEncryption.decrypt(mediaKey, url, MediaEncryption.MEDIA_TYPE_VIDEO);
39+
this.mp4FullResolution = decryptedBytes != null ? decryptedBytes : jpegMp4Thumbnail;
3940
}
4041

4142
public String getMimetype() {

0 commit comments

Comments
 (0)