Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

RtspStream.stopRecord() sometimes blocks in Service.onDestroy() since 2.8.1

Abierto
#2,192 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
android, kotlin

Línea de trabajo

Start by reading the RtspStream.stopRecord() implementation and the RecordController stop/status-callback path, then check how they interact with Android Service onDestroy(). Try to reproduce the intermittent hang on the reported Android 13 device and compare behavior between library versions 2.6.7 and 2.8.1. Done means stopRecord() returns during service destruction and the STOPPED event is emitted.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug
After upgrading the library from version 2.6.7 to 2.8.1, RtspStream.stopRecord() sometimes blocks when it is called from the onDestroy() method of an Android Service.
With library version 2.6.7, the same implementation worked correctly.
When the issue occurs, the call to:
rtspStream.stopRecord()
does not appear to return. The expected RecordController onStatusChange STOPPED event is not received.
The issue is intermittent and does not occur every time the Service is destroyed.

To Reproduce
Steps to reproduce the behavior:

Use com.github.pedroSG94.RootEncoder:library:2.8.1.
Use an Android 13 custom device.
Create and start an RtspStream.
Start recording.
Destroy the Android Service that manages the stream.
Call rtspStream.stopRecord() from the Service onDestroy() method.
In some cases, stopRecord() appears to block.
The expected RecordController onStatusChange STOPPED event is never received.
Code after rtspStream.stopRecord() is not executed.

The same steps work correctly with library version 2.6.7.

Expected behavior
rtspStream.stopRecord() should complete normally when called from the Service onDestroy() method.
The RecordController should emit the STOPPED status event and execution should continue with the code following rtspStream.stopRecord().
This behavior worked correctly with library version 2.6.7.

Library version: 2.8.1
Device: Custom Android device
OS: Android 13
Media server: RTSP
Class used: RtspStream

Additional context
The application uses:

implementation "com.github.pedroSG94.RootEncoder:library:2.8.1"

The problem appears to be a regression between library versions 2.6.7 and 2.8.1, since the same application code and device configuration worked correctly with version 2.6.7.

The relevant code is executed from the onDestroy() method of an Android Service:

override fun onDestroy() {
// ...
rtspStream.stopRecord()
// These instructions are not executed when the issue occurs
// ...
super.onDestroy()
}

When the problem occurs, execution stops at rtspStream.stopRecord(). I do not receive the expected:
RecordController onStatusChange STOPPED callback.

The issue is intermittent: sometimes stopRecord() works correctly, while other times it appears to remain blocked indefinitely.

Lenguaje dominante
Kotlin
Estrellas
3k
Forks
946
Merge medio
4 d 6 h
PR fusionados (30 d)
9

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pedroSG94/RootEncoder

Todos los issues de pedroSG94/RootEncoder

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.