]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix FTBFS introduced by 76d8fc8bc5455322558c764c84755ebbba254ad5
authorMichael Marley <michael@michaelmarley.com>
Fri, 23 Aug 2024 22:13:31 +0000 (18:13 -0400)
committerFlole <Flole998@users.noreply.github.com>
Sat, 24 Aug 2024 00:38:39 +0000 (02:38 +0200)
Older versions of GCC don't like declaring a variable in the middle
of a switch/case and will fail with "error: a label can only be
part of a statement and a declaration is not a statement".

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

index 27b699e2458e93ae6e055755bbfa413f7834c5f7..fa5024de4c3d90bb133c4c997dd59ac2e3cc1124 100644 (file)
@@ -668,6 +668,7 @@ tvh_codec_profile_vaapi_h264_open(tvh_codec_profile_vaapi_t *self,
     if (self->rc_mode != VAAPI_ENC_PARAMS_RC_SKIP) {
         AV_DICT_SET_INT(opts, "rc_mode", self->rc_mode, AV_DICT_DONT_OVERWRITE);
     }
+    int tempSupport = 0;
     switch (self->platform) {
         case VAAPI_ENC_PLATFORM_UNCONSTRAINED:
             // Uncontrained --> will allow any combination of parameters (valid or invalid)
@@ -711,7 +712,6 @@ tvh_codec_profile_vaapi_h264_open(tvh_codec_profile_vaapi_t *self,
             break;
         case VAAPI_ENC_PLATFORM_INTEL:
             // Intel
-            int tempSupport = 0;
             if (self->low_power) {
                 tempSupport = vainfo_encoder_maxBfreames(VAINFO_H264_LOW_POWER);
             }