Procházet zdrojové kódy

obs-ffmpeg: Make VAAPI rc_mode comparison case insensitive

`get_rc_mode()` compares the incoming rate control mode string
to the .name member of rc_mode_t, and the table entries are
all upper-case. This caused a crash when the incoming string
is set to "cbr" instead of "CBR". Make the string comparison
case insensitive.
Alex Luccisano před 1 rokem
rodič
revize
7decef8ab0
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c

+ 1 - 1
plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c

@@ -229,7 +229,7 @@ static const rc_mode_t *get_rc_mode(const char *name)
 
 	const rc_mode_t *rc_mode = RC_MODES;
 
-	while (!!rc_mode->name && strcmp(rc_mode->name, name) != 0)
+	while (!!rc_mode->name && astrcmpi(rc_mode->name, name) != 0)
 		rc_mode++;
 
 	return rc_mode ? rc_mode : RC_MODES;