Explorar el Código

Merge pull request #671 from reboot/fix_missing_profile_end

libobs: Fix missing call to profile_end() when encoding fails
Jim hace 9 años
padre
commit
7a077b311a
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      libobs/obs-encoder.c

+ 2 - 1
libobs/obs-encoder.c

@@ -796,7 +796,7 @@ static inline void do_encode(struct obs_encoder *encoder,
 		full_stop(encoder);
 		blog(LOG_ERROR, "Error encoding with encoder '%s'",
 				encoder->context.name);
-		return;
+		goto error;
 	}
 
 	if (received) {
@@ -822,6 +822,7 @@ static inline void do_encode(struct obs_encoder *encoder,
 		pthread_mutex_unlock(&encoder->callbacks_mutex);
 	}
 
+error:
 	profile_end(do_encode_name);
 }