linkedin / LiTr

Lightweight hardware accelerated video/audio transcoder for Android.
BSD 2-Clause "Simplified" License
608 stars 85 forks source link

java.lang.RuntimeException: Surface frame wait timed out #266

Open Zhaoyuntao opened 10 months ago

Zhaoyuntao commented 10 months ago

Hi friend, recently I got this exception on our reporting platform and it hasn't happened before. I have no idea about what can triggers this exception, have you ever had a similar problem? Over 90 percent of the devices are sumsung Galaxy A12 and A50s.

This is the stack trace:

java.lang.RuntimeException: Surface frame wait timed out at com.linkedin.android.litr.render.VideoRenderInputSurface.awaitNewImage(VideoRenderInputSurface.java:125) at com.linkedin.android.litr.render.GlVideoRenderer.renderFrame(GlVideoRenderer.java:143) at com.linkedin.android.litr.transcoder.VideoTrackTranscoder.resizeDecodedInputFrame(VideoTrackTranscoder.java:230) at com.linkedin.android.litr.transcoder.VideoTrackTranscoder.processNextFrame(VideoTrackTranscoder.java:140) at com.linkedin.android.litr.TransformationJob.processNextFrame(TransformationJob.java:211) at com.linkedin.android.litr.TransformationJob.transform(TransformationJob.java:108) at com.linkedin.android.litr.TransformationJob.run(TransformationJob.java:77) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)

Zhaoyuntao commented 10 months ago

I read the source code and I noticed this wait logic: image

Does it trigger the exception after 10 seconds If I canceled the transformationJob before this wait ending?