changeset 32478:87870a8a114a

Support for -force-key-frames for ve_x264.
author cigaes
date Fri, 29 Oct 2010 13:53:16 +0000
parents 2f95644eb8cb
children a14d1a13a342
files DOCS/man/en/mplayer.1 libmpcodecs/ve_x264.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.
 .
 .
 .
--- 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 <x264.h>
@@ -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;
 }