encoder: h264: Fix the period between I/P frames

If the key-frame period is set as one, then ip_period shuld be zero

https://bugzilla.gnome.org/show_bug.cgi?id=734992
This commit is contained in:
Sreerenj Balachandran 2014-11-27 12:11:03 +02:00
parent 7e4e6fc019
commit 8bf8f1104d

View file

@ -1639,6 +1639,8 @@ fill_sequence (GstVaapiEncoderH264 * encoder, GstVaapiEncSequence * sequence)
seq_param->intra_period = GST_VAAPI_ENCODER_KEYFRAME_PERIOD (encoder);
seq_param->intra_idr_period = GST_VAAPI_ENCODER_KEYFRAME_PERIOD (encoder);
seq_param->ip_period = 1 + encoder->num_bframes;
seq_param->ip_period = seq_param->intra_period > 1 ?
(1 + encoder->num_bframes) : 0;
seq_param->bits_per_second = encoder->bitrate_bits;
seq_param->max_num_ref_frames = ref_pool->max_ref_frames;