[SCM] libav/experimental: Make libx264 take the pict_type input parameter into account, thus making forced key frames work.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:18:05 UTC 2013


The following commit has been merged in the experimental branch:
commit 3ab354d7778cd84bd92e17e5b3563a8180053c8a
Author: Nicolas George <nicola.george at normalesup.org>
Date:   Mon Oct 25 14:40:00 2010 +0000

    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
    
    Originally committed as revision 25567 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 7ce04a6..6da7f2a 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -100,7 +100,11 @@ static int X264_frame(AVCodecContext *ctx, uint8_t *buf,
         }
 
         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 {

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list