1
0
Эх сурвалжийг харах

Merge pull request #671 from reboot/fix_missing_profile_end

libobs: Fix missing call to profile_end() when encoding fails
Jim 9 жил өмнө
parent
commit
7a077b311a
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  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);
 }