From 30648a4438c70406be62dde8cdc56f3f56a4d1df Mon Sep 17 00:00:00 2001 From: Bleuzen <12885163+Bleuzen@users.noreply.github.com> Date: Sun, 23 Apr 2023 13:54:44 +0200 Subject: [PATCH] obs-ffmpeg: obs-ffmpeg-nvenc.c: clang-format doing formatting things --- plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c | 29 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c b/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c index d2240510d3ae95..35c38224537419 100644 --- a/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c +++ b/plugins/obs-ffmpeg/obs-ffmpeg-nvenc.c @@ -294,7 +294,7 @@ static void on_first_packet(void *data, AVPacket *pkt, struct darray *da) &enc->sei.array, &enc->sei.num); } else #endif - if (enc->av1) { + if (enc->av1) { // TODO: add obs_extract_av1_headers } else { obs_extract_avc_headers(pkt->data, pkt->size, @@ -332,11 +332,10 @@ static void *nvenc_create_internal(obs_data_t *settings, obs_encoder_t *encoder, #else UNUSED_PARAMETER(hevc); #endif - if (av1) { - if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder, - "av1_nvenc", "nvenc_av1", - ENCODER_NAME_AV1, on_init_error, - on_first_packet)) + if (av1) { + if (!ffmpeg_video_encoder_init( + &enc->ffve, enc, encoder, "av1_nvenc", "nvenc_av1", + ENCODER_NAME_AV1, on_init_error, on_first_packet)) goto fail; } else { if (!ffmpeg_video_encoder_init(&enc->ffve, enc, encoder, @@ -382,12 +381,14 @@ static void *h264_nvenc_create(obs_data_t *settings, obs_encoder_t *encoder) } bool psycho_aq = obs_data_get_bool(settings, "psycho_aq"); - void *enc = nvenc_create_internal(settings, encoder, psycho_aq, false, false); + void *enc = nvenc_create_internal(settings, encoder, psycho_aq, false, + false); if ((enc == NULL) && psycho_aq) { blog(LOG_WARNING, "[NVENC encoder] nvenc_create_internal failed, " "trying again without Psycho Visual Tuning"); - enc = nvenc_create_internal(settings, encoder, false, false, false); + enc = nvenc_create_internal(settings, encoder, false, false, + false); } return enc; @@ -421,12 +422,14 @@ static void *hevc_nvenc_create(obs_data_t *settings, obs_encoder_t *encoder) } bool psycho_aq = obs_data_get_bool(settings, "psycho_aq"); - void *enc = nvenc_create_internal(settings, encoder, psycho_aq, true, false); + void *enc = nvenc_create_internal(settings, encoder, psycho_aq, true, + false); if ((enc == NULL) && psycho_aq) { blog(LOG_WARNING, "[NVENC encoder] nvenc_create_internal failed, " "trying again without Psycho Visual Tuning"); - enc = nvenc_create_internal(settings, encoder, false, true, false); + enc = nvenc_create_internal(settings, encoder, false, true, + false); } return enc; @@ -459,12 +462,14 @@ static void *av1_nvenc_create(obs_data_t *settings, obs_encoder_t *encoder) } bool psycho_aq = obs_data_get_bool(settings, "psycho_aq"); - void *enc = nvenc_create_internal(settings, encoder, psycho_aq, false, true); + void *enc = nvenc_create_internal(settings, encoder, psycho_aq, false, + true); if ((enc == NULL) && psycho_aq) { blog(LOG_WARNING, "[NVENC encoder] nvenc_create_internal failed, " "trying again without Psycho Visual Tuning"); - enc = nvenc_create_internal(settings, encoder, false, false, true); + enc = nvenc_create_internal(settings, encoder, false, false, + true); } return enc;