Explorar el Código

libobs: Shut down encoder if valid but not active

It's not impossible that this sort of thing could happen, although
unlikely.
jp9000 hace 10 años
padre
commit
fb32b85f4c
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      libobs/obs-encoder.c

+ 2 - 2
libobs/obs-encoder.c

@@ -369,8 +369,8 @@ bool obs_encoder_initialize(obs_encoder_t *encoder)
 
 
 	if (encoder->active)
 	if (encoder->active)
 		return true;
 		return true;
-	if (encoder->context.data)
-		return false;
+
+	obs_encoder_shutdown(encoder);
 
 
 	if (encoder->info.create)
 	if (encoder->info.create)
 		encoder->context.data = encoder->info.create(
 		encoder->context.data = encoder->info.create(