Selaa lähdekoodia

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 1 vuosi sitten
vanhempi
sitoutus
7decef8ab0
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;
 	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++;
 		rc_mode++;
 
 
 	return rc_mode ? rc_mode : RC_MODES;
 	return rc_mode ? rc_mode : RC_MODES;