mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-30 17:58:37 +08:00
libobs: Fix missing call to profile_end() when encoding fails
The do_encode() method does not call profile_end() when encoding fails which causes an error message about mismatching names being logged.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user