diff options
author | Martin Storsjö <martin@martin.st> | 2015-03-05 13:57:44 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-03-06 10:02:47 +0200 |
commit | 25c29d32835f38cdc5f0c84fa27dfc489a228770 (patch) | |
tree | fe148ad17e621a0e09f36a1419d918cb2eef07c9 /libavcodec/libopenh264enc.c | |
parent | 88b160a457e491cb9e014630ef5387ad3500258e (diff) | |
download | ffmpeg-25c29d32835f38cdc5f0c84fa27dfc489a228770.tar.gz |
libopenh264enc: Add support for building with OpenH264 1.4
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/libopenh264enc.c')
-rw-r--r-- | libavcodec/libopenh264enc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c index 459a0ef229..e3f9a95d24 100644 --- a/libavcodec/libopenh264enc.c +++ b/libavcodec/libopenh264enc.c @@ -39,6 +39,10 @@ typedef struct SVCContext { char *profile; } SVCContext; +#define OPENH264_VER_AT_LEAST(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 +107,11 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) param.bEnableLongTermReference = 0; param.iLtrMarkPeriod = 30; param.uiIntraPeriod = avctx->gop_size; +#if OPENH264_VER_AT_LEAST(1, 4) + param.eSpsPpsIdStrategy = CONSTANT_ID; +#else param.bEnableSpsPpsIdAddition = 0; +#endif param.bPrefixNalAddingCtrl = 0; param.iLoopFilterDisableIdc = !s->loopfilter; param.iEntropyCodingModeFlag = 0; |