iknow4x / Android-Video-Trimmer

The Android-Video-Trimmer project implements the selection of clips for long and short videos. It uses MediaMetadataRetriever to obtain video frames, and uses ffmpeg for video cropping and video compression.
Apache License 2.0
1.11k stars 264 forks source link

bitmap 为空 #23

Closed shanerou closed 6 years ago

shanerou commented 6 years ago

09-04 00:03:06.031 4960-4960/com.iknow.android E/Minikin: addFont failed to create font data/skin/fonts/DroidSansChinese.ttf 09-04 00:03:09.162 4960-5015/com.iknow.android E/MediaMetadataRetrieverJNI: getFrameAtTime: videoFrame is a NULL pointer 09-04 00:03:09.163 4960-5015/com.iknow.android E/AndroidRuntime: FATAL EXCEPTION: pool-2-thread-1 Process: com.iknow.android, PID: 4960 java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:591) at com.iknow.android.utils.TrimVideoUtil$2.execute(TrimVideoUtil.java:106) at iknow.android.utils.thread.BackgroundExecutor$Task.run(BackgroundExecutor.java:212) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

iknow4x commented 6 years ago

@shanerou 你好,我在出异常的地方加了保护,你更新一下看看。