On 05/03/15 12:59, Martin Storsjö wrote:
---
  libavcodec/libopenh264enc.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c
index 459a0ef..961f1cb 100644
--- a/libavcodec/libopenh264enc.c
+++ b/libavcodec/libopenh264enc.c
@@ -39,6 +39,8 @@ typedef struct SVCContext {
      char *profile;
  } SVCContext;

+#define OPENH264_VER(maj, min) ((OPENH264_MAJOR > (maj)) || (OPENH264_MAJOR == (maj) 
&& OPENH264_MINOR >= (min)))
+
  #define OFFSET(x) offsetof(SVCContext, x)
  #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
  static const AVOption options[] = {
@@ -103,7 +105,11 @@ static av_cold int svc_encode_init(AVCodecContext *avctx)
      param.bEnableLongTermReference   = 0;
      param.iLtrMarkPeriod             = 30;
      param.uiIntraPeriod              = avctx->gop_size;
+#if OPENH264_VER(1, 4)
+    param.eSpsPpsIdStrategy          = CONSTANT_ID;
+#else
      param.bEnableSpsPpsIdAddition    = 0;
+#endif
      param.bPrefixNalAddingCtrl       = 0;
      param.iLoopFilterDisableIdc      = !s->loopfilter;
      param.iEntropyCodingModeFlag     = 0;


Probably Ok.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to