# HG changeset patch # User cigaes # Date 1288360482 0 # Node ID a14d1a13a342931e3910f1ee52b742f6a660e99e # Parent 87870a8a114ab6a0f83ad8128ae4b13e629d472f Support for -force-key-frames for ve_xvid4. diff -r 87870a8a114a -r a14d1a13a342 DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Fri Oct 29 13:53:16 2010 +0000 +++ b/DOCS/man/en/mplayer.1 Fri Oct 29 13:54:42 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, x264. +lavc, x264, xvid. . . . diff -r 87870a8a114a -r a14d1a13a342 libmpcodecs/ve_xvid4.c --- a/libmpcodecs/ve_xvid4.c Fri Oct 29 13:53:16 2010 +0000 +++ b/libmpcodecs/ve_xvid4.c Fri Oct 29 13:54:42 2010 +0000 @@ -46,6 +46,7 @@ #include "img_format.h" #include "mp_image.h" +#include "ve.h" #include "vf.h" #include @@ -536,6 +537,9 @@ if(set_frame_struct(mod, mpi) == BAD) return BAD; + mod->frame.type = is_forced_key_frame(pts) || xvidenc_motion == 0 ? + XVID_TYPE_IVOP : XVID_TYPE_AUTO; + /* ------------------------------------------------------------------- * Encode the frame * ---------------------------------------------------------------- */