openh264enc: Fix compilation with openh264 v2.0
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 8 May 2019 11:35:25 +0000 (13:35 +0200)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 8 Aug 2019 10:11:25 +0000 (11:11 +0100)
As OpenH264 increased its version to 2.0 the guard for structure
member is not valid.

This patch will fix the compilation with gst-build and openh264.

ext/openh264/gstopenh264enc.cpp

index aa8138d..11be2a5 100644 (file)
@@ -739,7 +739,7 @@ gst_openh264enc_set_format (GstVideoEncoder * encoder,
   enc_params.bEnableSceneChangeDetect = openh264enc->scene_change_detection;
   enc_params.bEnableFrameSkip = openh264enc->enable_frame_skip;
   enc_params.bEnableLongTermReference = 0;
-#if OPENH264_MINOR >= 4
+#if (OPENH264_MAJOR > 1 || (OPENH264_MAJOR == 1 && OPENH264_MINOR >= 4))
   enc_params.eSpsPpsIdStrategy = CONSTANT_ID;
 #else
   enc_params.bEnableSpsPpsIdAddition = 0;