]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
nvenc: Fix Werror=misleading-indentation FTBFS
authorMichael Marley <michael@michaelmarley.com>
Sun, 2 Jan 2022 17:38:17 +0000 (12:38 -0500)
committerFlole998 <Flole998@users.noreply.github.com>
Sun, 2 Jan 2022 18:50:57 +0000 (19:50 +0100)
Commit 0165f365cd58bbcc3734e4ec9ce696b42870ff8e introduced an FTBFS
when -Werror=misleading-indentation is passed to the compiler.  It
appears from changes elsewhere in the file (around line 450) that
the "Set Defaults" statements were not intended to be included in
the if block, so this commit reformats it to make that obvious (and
also add curlybrackets as was done around 450.)

src/transcoding/codec/codecs/libs/nvenc.c

index 92aac725b0c819002bf4f18664b0422f7880c663..ad1f2f7b0058a3e90b10e9b10d580b7f6b48f19e 100644 (file)
@@ -324,17 +324,19 @@ tvh_codec_profile_nvenc_h264_open(tvh_codec_profile_nvenc_t *self,
     }
 
     if (self->nvenc_profile != NV_ENC_PROFILE_UNKNOWN &&
-        (s = val2str(self->nvenc_profile, profiletab)) != NULL)
-      AV_DICT_SET(opts, "profile", s, 0);
-      // ------ Set Defaults ---------
-      AV_DICT_SET_INT(opts, "qmin", "-1", 0);
-      AV_DICT_SET_INT(opts, "qmax", "-1", 0);
-      AV_DICT_SET_INT(opts, "qdiff", "-1", 0);
-      AV_DICT_SET_INT(opts, "qblur", "-1", 0);
-      AV_DICT_SET_INT(opts, "qcomp", "-1", 0);
-      AV_DICT_SET_INT(opts, "g", "250", 0);
-      AV_DICT_SET_INT(opts, "bf", "0", 0);
-      AV_DICT_SET_INT(opts, "refs", "0", 0);
+        (s = val2str(self->nvenc_profile, profiletab)) != NULL) {
+        AV_DICT_SET(opts, "profile", s, 0);
+    }
+    
+    // ------ Set Defaults ---------
+    AV_DICT_SET_INT(opts, "qmin", "-1", 0);
+    AV_DICT_SET_INT(opts, "qmax", "-1", 0);
+    AV_DICT_SET_INT(opts, "qdiff", "-1", 0);
+    AV_DICT_SET_INT(opts, "qblur", "-1", 0);
+    AV_DICT_SET_INT(opts, "qcomp", "-1", 0);
+    AV_DICT_SET_INT(opts, "g", "250", 0);
+    AV_DICT_SET_INT(opts, "bf", "0", 0);
+    AV_DICT_SET_INT(opts, "refs", "0", 0);
     return 0;
 }