catch NPE in getVideoPreview() because getFrame sometimes returns null
This commit is contained in:
parent
ed2fa20414
commit
8b331895d1
|
@ -417,7 +417,7 @@ public class FileBackend {
|
||||||
frame = metadataRetriever.getFrameAtTime(0);
|
frame = metadataRetriever.getFrameAtTime(0);
|
||||||
metadataRetriever.release();
|
metadataRetriever.release();
|
||||||
frame = resize(frame, size);
|
frame = resize(frame, size);
|
||||||
} catch(IllegalArgumentException e) {
|
} catch(IllegalArgumentException | NullPointerException e) {
|
||||||
frame = Bitmap.createBitmap(size,size, Bitmap.Config.ARGB_8888);
|
frame = Bitmap.createBitmap(size,size, Bitmap.Config.ARGB_8888);
|
||||||
frame.eraseColor(0xff000000);
|
frame.eraseColor(0xff000000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue