summaryrefslogtreecommitdiff
path: root/libavcodec/libx264.c
diff options
context:
space:
mode:
authorNicolas George <nicola.george@normalesup.org>2010-10-25 14:40:00 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-10-25 14:40:00 +0000
commit3ab354d7778cd84bd92e17e5b3563a8180053c8a (patch)
tree9f3e2b2b897c92d16b3ef363d209966a543b66ee /libavcodec/libx264.c
parent276df9d8210121f6d59b7876e1724ebe7a11f5e5 (diff)
downloadffmpeg-3ab354d7778cd84bd92e17e5b3563a8180053c8a.tar.gz
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
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r--libavcodec/libx264.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 7ce04a62cc..6da7f2ae03 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 {