[FFmpeg-devel] [PATCH 2/2] avcodec/libx264: Fix build with older than 142 X264_BUILD

Michael Niedermayer michaelni at gmx.at
Sat Oct 4 12:32:05 CEST 2014


untested

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/libx264.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 7839248..842a066 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -532,8 +532,10 @@ static av_cold int X264_init(AVCodecContext *avctx)
         x4->params.b_bluray_compat = x4->bluray_compat;
         x4->params.b_vfr_input = 0;
     }
+#if X264_BUILD >= 142
     if (x4->avcintra_class >= 0)
         x4->params.i_avcintra_class = x4->avcintra_class;
+#endif
     if (x4->b_bias != INT_MIN)
         x4->params.i_bframe_bias              = x4->b_bias;
     if (x4->b_pyramid >= 0)
@@ -811,7 +813,9 @@ static const AVOption options[] = {
     { "none",          NULL, 0, AV_OPT_TYPE_CONST, {.i64 = X264_NAL_HRD_NONE}, INT_MIN, INT_MAX, VE, "nal-hrd" },
     { "vbr",           NULL, 0, AV_OPT_TYPE_CONST, {.i64 = X264_NAL_HRD_VBR},  INT_MIN, INT_MAX, VE, "nal-hrd" },
     { "cbr",           NULL, 0, AV_OPT_TYPE_CONST, {.i64 = X264_NAL_HRD_CBR},  INT_MIN, INT_MAX, VE, "nal-hrd" },
+#if X264_BUILD >= 142
     { "avcintra-class","AVC-Intra class 50/100/200",                      OFFSET(avcintra_class),AV_OPT_TYPE_INT,     { .i64 = -1 }, -1, 200   , VE},
+#endif
     { "x264-params",  "Override the x264 configuration using a :-separated list of key=value parameters", OFFSET(x264_params), AV_OPT_TYPE_STRING, { 0 }, 0, 0, VE },
     { NULL },
 };
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list