Closed LQ753799168 closed 10 months ago
By the way, the devices with this problem are Huawei Android 7.0,level 24, Android 8.0.0,level 26, Android 8.1.0,level 27
This will cause a crash
Caused by:
java.lang.OutOfMemoryError:pthread_create (1040KB stack) failed: Out of memory
java.lang.Thread.nativeCreate(Native Method)
java.lang.Thread.start(Thread.java:753)
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:970)
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1377)
java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:620)
com.google.android.exoplr2avp.upstream.Loader$LoadTask.execute(Loader.java:510)
com.google.android.exoplr2avp.upstream.Loader$LoadTask.start(Loader.java:363)
com.google.android.exoplr2avp.upstream.Loader.startLoading(Loader.java:257)
com.google.android.exoplr2avp.source.ProgressiveMediaPeriod.startLoading(ProgressiveMediaPeriod.java:818)
com.google.android.exoplr2avp.source.ProgressiveMediaPeriod.prepare(ProgressiveMediaPeriod.java:234)
com.google.android.exoplr2avp.source.MaskingMediaPeriod.prepare(MaskingMediaPeriod.java:145)
com.google.android.exoplr2avp.ExoPlayerImplInternal.maybeUpdateLoadingPeriod(ExoPlayerImplInternal.java:1988)
com.google.android.exoplr2avp.ExoPlayerImplInternal.updatePeriods(ExoPlayerImplInternal.java:1968)
com.google.android.exoplr2avp.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:955)
com.google.android.exoplr2avp.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:490)
android.os.Handler.dispatchMessage(Handler.java:105)
android.os.Looper.loop(Looper.java:166)
android.os.HandlerThread.run(HandlerThread.java:65)
The com.google.android.exoplayer2 project is now deprecated. We are not accepting any new issues in this project. Please file your issue in the androidx.media3 GitHub project instead: https://github.com/androidx/media/issues
When I play a video on android, if I don't set Loop, then create ExoPlayer: Loader: ProgressiveMediaPeriod thread there would be only one, but if I check the Loop, Will appear many ExoPlayer: Loader: ProgressiveMediaPeriod threads, sometimes as many as 19, could you tell me how to avoid the excessive number of threads created, the number of the number of threads created which parameters related。
Unity version: 2019.4.30f1 AVPro Video version:2.8.5
https://github.com/google/ExoPlayer/assets/35380099/c68c7e8e-f202-4fd6-910b-e6ba88db9f4a
https://github.com/google/ExoPlayer/assets/35380099/23387d2b-114f-4120-8b0d-5532e0ccd8ad
Video 1 will create 5 threads。 Video 2 will create 19 threads
Verification method:
For example