obs-ffmpeg: Remove unused variables for NVENC
parent
e16f336882
commit
9780d2f596
|
@ -949,11 +949,8 @@ static bool init_textures(struct nvenc_data *enc)
|
||||||
static void nvenc_destroy(void *data);
|
static void nvenc_destroy(void *data);
|
||||||
|
|
||||||
static bool init_specific_encoder(struct nvenc_data *enc, bool hevc,
|
static bool init_specific_encoder(struct nvenc_data *enc, bool hevc,
|
||||||
obs_data_t *settings, obs_encoder_t *encoder,
|
obs_data_t *settings, int bf, bool psycho_aq)
|
||||||
int bf, bool psycho_aq)
|
|
||||||
{
|
{
|
||||||
bool init = false;
|
|
||||||
|
|
||||||
#ifdef ENABLE_HEVC
|
#ifdef ENABLE_HEVC
|
||||||
if (hevc)
|
if (hevc)
|
||||||
return init_encoder_hevc(enc, settings, bf, psycho_aq);
|
return init_encoder_hevc(enc, settings, bf, psycho_aq);
|
||||||
|
@ -963,7 +960,7 @@ static bool init_specific_encoder(struct nvenc_data *enc, bool hevc,
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool init_encoder(struct nvenc_data *enc, bool hevc,
|
static bool init_encoder(struct nvenc_data *enc, bool hevc,
|
||||||
obs_data_t *settings, obs_encoder_t *encoder)
|
obs_data_t *settings)
|
||||||
{
|
{
|
||||||
const int bf = (int)obs_data_get_int(settings, "bf");
|
const int bf = (int)obs_data_get_int(settings, "bf");
|
||||||
const bool psycho_aq = obs_data_get_bool(settings, "psycho_aq");
|
const bool psycho_aq = obs_data_get_bool(settings, "psycho_aq");
|
||||||
|
@ -990,8 +987,7 @@ static bool init_encoder(struct nvenc_data *enc, bool hevc,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!init_specific_encoder(enc, hevc, settings, encoder, bf,
|
if (!init_specific_encoder(enc, hevc, settings, bf, psycho_aq)) {
|
||||||
psycho_aq)) {
|
|
||||||
if (!psycho_aq)
|
if (!psycho_aq)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1000,8 +996,7 @@ static bool init_encoder(struct nvenc_data *enc, bool hevc,
|
||||||
nv.nvEncDestroyEncoder(enc->session);
|
nv.nvEncDestroyEncoder(enc->session);
|
||||||
enc->session = NULL;
|
enc->session = NULL;
|
||||||
if (!init_session(enc) ||
|
if (!init_session(enc) ||
|
||||||
!init_specific_encoder(enc, hevc, settings, encoder, bf,
|
!init_specific_encoder(enc, hevc, settings, bf, false)) {
|
||||||
false)) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1029,7 +1024,7 @@ static void *nvenc_create_internal(bool hevc, obs_data_t *settings,
|
||||||
if (!init_session(enc)) {
|
if (!init_session(enc)) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if (!init_encoder(enc, hevc, settings, encoder)) {
|
if (!init_encoder(enc, hevc, settings)) {
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if (!init_bitstreams(enc)) {
|
if (!init_bitstreams(enc)) {
|
||||||
|
|
Loading…
Reference in New Issue