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:
Christoph Hohmann 2016-10-24 13:43:22 +02:00
parent 39a91d749c
commit e775abaa71

View File

@ -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);
}