changeset 32477:2f95644eb8cb

Support for -force-key-frames for ve_lavc.
author cigaes
date Fri, 29 Oct 2010 13:52:26 +0000
parents af9ef007bec6
children 87870a8a114a
files DOCS/man/en/mplayer.1 libmpcodecs/ve_lavc.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/man/en/mplayer.1	Fri Oct 29 13:50:05 2010 +0000
+++ b/DOCS/man/en/mplayer.1	Fri Oct 29 13:52:26 2010 +0000
@@ -8014,6 +8014,8 @@
 need to use the fixpts filter for this option to work.
 .sp 1
 Not all codecs support forced key frames.
+Currently, support is only implemented for the following encoders:
+lavc.
 .
 .
 .
--- a/libmpcodecs/ve_lavc.c	Fri Oct 29 13:50:05 2010 +0000
+++ b/libmpcodecs/ve_lavc.c	Fri Oct 29 13:52:26 2010 +0000
@@ -45,6 +45,7 @@
 #include "img_format.h"
 #include "fmt-conversion.h"
 #include "mp_image.h"
+#include "ve.h"
 #include "vf.h"
 #include "vd_ffmpeg.h"
 
@@ -772,6 +773,7 @@
     pic->linesize[0]=mpi->stride[0];
     pic->linesize[1]=mpi->stride[1];
     pic->linesize[2]=mpi->stride[2];
+    pic->pict_type = is_forced_key_frame(pts) ? FF_I_TYPE : 0;
 
     if(lavc_param_interlaced_dct){
         if((mpi->fields & MP_IMGFIELD_ORDERED) && (mpi->fields & MP_IMGFIELD_INTERLACED))