[FFmpeg-cvslog] r25567 - trunk/libavcodec/libx264.c

cehoyos subversion
Mon Oct 25 16:40:01 CEST 2010


Author: cehoyos
Date: Mon Oct 25 16:40:00 2010
New Revision: 25567

Log:
Make libx264 take the pict_type input parameter into account,
thus making forced key frames work.

Patch by Nicolas George, nicolas d george a normalesup d org

Modified:
   trunk/libavcodec/libx264.c

Modified: trunk/libavcodec/libx264.c
==============================================================================
--- trunk/libavcodec/libx264.c	Mon Oct 25 08:15:21 2010	(r25566)
+++ trunk/libavcodec/libx264.c	Mon Oct 25 16:40:00 2010	(r25567)
@@ -100,7 +100,11 @@ static int X264_frame(AVCodecContext *ct
         }
 
         x4->pic.i_pts  = frame->pts;
-        x4->pic.i_type = X264_TYPE_AUTO;
+        x4->pic.i_type =
+            frame->pict_type == FF_I_TYPE ? X264_TYPE_KEYFRAME :
+            frame->pict_type == FF_P_TYPE ? X264_TYPE_P :
+            frame->pict_type == FF_B_TYPE ? X264_TYPE_B :
+                                            X264_TYPE_AUTO;
     }
 
     do {



More information about the ffmpeg-cvslog mailing list