# HG changeset patch # User darkshikari # Date 1263873608 0 # Node ID b2ea6b0d17bf8356c62a718e69e65d31634845dd # Parent fb2dcafa2db32451d823e5c599db74a4a5655fea Update libx264.c to use new libx264 features With b_keyframe instead of IDR for detecting keyframes, ffmpeg should now support periodic encoding with periodic intra refresh (although there is no interface option for it yet). Set the new timebase values for full VFR input support. Bump configure to check for API version 83. diff -r fb2dcafa2db3 -r b2ea6b0d17bf libx264.c --- a/libx264.c Tue Jan 19 03:16:48 2010 +0000 +++ b/libx264.c Tue Jan 19 04:00:08 2010 +0000 @@ -109,7 +109,7 @@ if (bufsize < 0) return -1; - /* FIXME: dts */ + /* FIXME: libx264 now provides DTS, but AVFrame doesn't have a field for it. */ x4->out_pic.pts = pic_out.i_pts; switch (pic_out.i_type) { @@ -126,7 +126,7 @@ break; } - x4->out_pic.key_frame = pic_out.i_type == X264_TYPE_IDR; + x4->out_pic.key_frame = pic_out.b_keyframe; x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA; return bufsize; @@ -208,8 +208,8 @@ x4->params.i_height = avctx->height; x4->params.vui.i_sar_width = avctx->sample_aspect_ratio.num; x4->params.vui.i_sar_height = avctx->sample_aspect_ratio.den; - x4->params.i_fps_num = avctx->time_base.den; - x4->params.i_fps_den = avctx->time_base.num; + x4->params.i_fps_num = x4->params.i_timebase_den = avctx->time_base.den; + x4->params.i_fps_den = x4->params.i_timebase_num = avctx->time_base.num; x4->params.analyse.inter = 0; if (avctx->partitions) {