Browse Source

libobs: Clear last error on encoder shutdown

This fixes an issue where an encoder may error out on a path that
doesn't use obs_encoder_set_last_error, resulting in a stale error being
used.
Richard Stanway 5 years ago
parent
commit
0ea39baf95
1 changed files with 1 additions and 0 deletions
  1. 1 0
      libobs/obs-encoder.c

+ 1 - 0
libobs/obs-encoder.c

@@ -523,6 +523,7 @@ void obs_encoder_shutdown(obs_encoder_t *encoder)
 		encoder->offset_usec = 0;
 		encoder->start_ts = 0;
 	}
+	obs_encoder_set_last_error(encoder, NULL);
 	pthread_mutex_unlock(&encoder->init_mutex);
 }