encoder: h264,h265: fix regression in offset count

In commit dc35dafa a bug was introduced because I assumed that
GST_CLOCK_TIME_NONE is zero when is -1. This patch fixes that mistake.

https://bugzilla.gnome.org/show_bug.cgi?id=772259
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-10-08 14:33:59 +02:00
parent 60ada3e76b
commit ef3ee8b7bb
2 changed files with 2 additions and 2 deletions

View file

@ -2473,7 +2473,7 @@ reset_properties (GstVaapiEncoderH264 * encoder)
encoder->cts_offset = gst_util_uint64_scale (GST_SECOND,
GST_VAAPI_ENCODER_FPS_D (encoder), GST_VAAPI_ENCODER_FPS_N (encoder));
else
encoder->cts_offset = GST_CLOCK_TIME_NONE;
encoder->cts_offset = 0;
/* init max_frame_num, max_poc */
encoder->log2_max_frame_num =

View file

@ -2034,7 +2034,7 @@ reset_properties (GstVaapiEncoderH265 * encoder)
encoder->cts_offset = gst_util_uint64_scale (GST_SECOND,
GST_VAAPI_ENCODER_FPS_D (encoder), GST_VAAPI_ENCODER_FPS_N (encoder));
else
encoder->cts_offset = GST_CLOCK_TIME_NONE;
encoder->cts_offset = 0;
/* init max_poc */
encoder->log2_max_pic_order_cnt =