The current behavior doesn't forward non-IDR I-frames to the encoder. Signed-off-by: Will Kelleher <wkelle...@gogoair.com> --- ffmpeg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c index a866f72..61739a4 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1141,7 +1141,6 @@ static void do_video_out(AVFormatContext *s, mux_enc->field_order = AV_FIELD_PROGRESSIVE; in_picture->quality = enc->global_quality; - in_picture->pict_type = 0; pts_time = in_picture->pts != AV_NOPTS_VALUE ? in_picture->pts * av_q2d(enc->time_base) : NAN; @@ -1173,13 +1172,15 @@ static void do_video_out(AVFormatContext *s, ost->forced_keyframes_expr_const_values[FKF_N] += 1; } else if ( ost->forced_keyframes && !strncmp(ost->forced_keyframes, "source", 6) - && in_picture->key_frame==1) { + && in_picture->pict_type==AV_PICTURE_TYPE_I) { forced_keyframe = 1; } if (forced_keyframe) { in_picture->pict_type = AV_PICTURE_TYPE_I; av_log(NULL, AV_LOG_DEBUG, "Forced keyframe at time %f\n", pts_time); + } else { + in_picture->pict_type = 0; } update_benchmark(NULL); -- 2.6.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel