libs: encoder: h265: remove spurious assignation
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 8 Aug 2017 15:06:17 +0000 (17:06 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 8 Aug 2017 15:06:17 +0000 (17:06 +0200)
Coverity scan bug:

An assigned value that is never used may represent unnecessary
computation, an incorrect algorithm, or possibly the need for cleanup
or refactoring.

ip_period is assigned first to be rewritter inmediatly after. The
first assignation is spurious.

gst-libs/gst/vaapi/gstvaapiencoder_h265.c

index b2bf494..673145c 100644 (file)
@@ -1457,7 +1457,6 @@ fill_sequence (GstVaapiEncoderH265 * encoder, GstVaapiEncSequence * sequence)
 
   seq_param->intra_period = GST_VAAPI_ENCODER_KEYFRAME_PERIOD (encoder);
   seq_param->intra_idr_period = encoder->idr_period;
-  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;