# HG changeset patch # User cigaes # Date 1288360396 0 # Node ID 87870a8a114ab6a0f83ad8128ae4b13e629d472f # Parent 2f95644eb8cb0338cf04a68b381d6464b979b800 Support for -force-key-frames for ve_x264. diff -r 2f95644eb8cb -r 87870a8a114a DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Fri Oct 29 13:52:26 2010 +0000 +++ b/DOCS/man/en/mplayer.1 Fri Oct 29 13:53:16 2010 +0000 @@ -8015,7 +8015,7 @@ .sp 1 Not all codecs support forced key frames. Currently, support is only implemented for the following encoders: -lavc. +lavc, x264. . . . diff -r 2f95644eb8cb -r 87870a8a114a libmpcodecs/ve_x264.c --- a/libmpcodecs/ve_x264.c Fri Oct 29 13:52:26 2010 +0000 +++ b/libmpcodecs/ve_x264.c Fri Oct 29 13:53:16 2010 +0000 @@ -45,6 +45,7 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" +#include "ve.h" #include "ve_x264.h" #include @@ -244,6 +245,8 @@ } mod->pic.i_type = X264_TYPE_AUTO; + if (is_forced_key_frame(pts)) + mod->pic.i_type = X264_TYPE_KEYFRAME; return encode_frame(vf, &mod->pic) >= 0; }