Mercurial > mplayer.hg
changeset 32479:a14d1a13a342
Support for -force-key-frames for ve_xvid4.
author | cigaes |
---|---|
date | Fri, 29 Oct 2010 13:54:42 +0000 |
parents | 87870a8a114a |
children | 60453d752380 |
files | DOCS/man/en/mplayer.1 libmpcodecs/ve_xvid4.c |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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. . . .
--- 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 <xvid.h> @@ -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 * ---------------------------------------------------------------- */