Explorar o código

libobs/media-io: Prevent overwriting of remux input

Richard Stanway %!s(int64=7) %!d(string=hai) anos
pai
achega
41b7f85332
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      libobs/media-io/media-remux.c

+ 3 - 0
libobs/media-io/media-remux.c

@@ -143,6 +143,9 @@ bool media_remux_job_create(media_remux_job_t *job, const char *in_filename,
 	if (!os_file_exists(in_filename))
 		return false;
 
+	if (strcmp(in_filename, out_filename) == 0)
+		return false;
+
 	*job = (media_remux_job_t)bzalloc(sizeof(struct media_remux_job));
 	if (!*job)
 		return false;