將stopRetryCount函數加上removeCallbacks,停止重連功能

This commit is contained in:
Raymond Yang 2023-02-07 13:45:41 +08:00
parent 2f4e3659f9
commit df105dd518

View File

@ -117,6 +117,7 @@ class VideoView : ConstraintLayout, SurfaceHolder.Callback, GstCallback {
fun stopRetryCount() { fun stopRetryCount() {
retryCount = RETRY_OFF retryCount = RETRY_OFF
mHandler.removeCallbacks(retryRunnable)
} }
override fun surfaceCreated(holder: SurfaceHolder) { override fun surfaceCreated(holder: SurfaceHolder) {
@ -178,7 +179,7 @@ class VideoView : ConstraintLayout, SurfaceHolder.Callback, GstCallback {
retryCount++ retryCount++
} else { } else {
stopRetryCount() stopRetryCount()
//Log.e("${TAG}_$tag", "Retry count = 5, stopped retry...") Log.e("${TAG}_$tag", "Retry count = 5, stopped retry...")
} }
} }
} }