pili-engineering / PLDroidShortVideo

PLDroidShortVideo 是七牛推出的一款适用于 Android 平台的短视频 SDK,提供了包括美颜、滤镜、水印、断点录制、分段回删、视频编辑、混音特效、视频剪辑、本地转码、视频上传在内的多种功能,支持高度定制以及二次开发。
https://github.com/pili-engineering/PLDroidShortVideo
Apache License 2.0
1.69k stars 310 forks source link

涂鸦后 保存视频 出现width and height must be > 0错误 #147

Closed huihui4045 closed 5 years ago

huihui4045 commented 5 years ago

04-16 10:12:36.961 28479-31179/com.ziroom.awesome E/CrashReport: sys default last handle start!

--------- beginning of crash

04-16 10:12:36.963 28479-31179/com.ziroom.awesome E/AndroidRuntime: FATAL EXCEPTION: OffScreenRenderer Process: com.ziroom.awesome, PID: 28479 java.lang.IllegalArgumentException: width and height must be > 0 at android.graphics.Bitmap.createBitmap(Bitmap.java:850) at android.graphics.Bitmap.createBitmap(Bitmap.java:829) at android.graphics.Bitmap.createBitmap(Bitmap.java:796) at com.qiniu.pili.droid.shortvideo.b.n.a(ShortVideoEditorCore.java:741) at com.qiniu.pili.droid.shortvideo.b.n$1.onDrawFrame(ShortVideoEditorCore.java:875) at com.qiniu.pili.droid.shortvideo.b.q$9.a(ShortVideoTranscoderCore.java:1026) at com.qiniu.pili.droid.shortvideo.gl.b.a.f(OffScreenRenderer.java:311) at com.qiniu.pili.droid.shortvideo.gl.b.a.a(OffScreenRenderer.java:25) at com.qiniu.pili.droid.shortvideo.gl.b.a$c.handleMessage(OffScreenRenderer.java:234) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:150) at com.qiniu.pili.droid.shortvideo.gl.b.a.run(OffScreenRenderer.java:428) at java.lang.Thread.run(Thread.java:833)

BoleLiu commented 5 years ago

@huihui4045 这里通常是因为传入的 PLPaintView 的尺寸不对导致的,您可以检查下,我们后续也会考虑在这里加个保护机制来避免这种情况