openh264enc: Fix initial time-per-frame calculation

This commit is contained in:
Sebastian Dröge 2016-06-30 23:35:33 +02:00
parent 593ed6f3d7
commit 27c0a9306e

View file

@ -770,7 +770,7 @@ gst_openh264enc_handle_frame (GstVideoEncoder * encoder,
openh264enc->frame_count++;
if (frame) {
if (G_UNLIKELY (openh264enc->frame_count == 1)) {
openh264enc->time_per_frame = (GST_NSECOND / openh264enc->framerate);
openh264enc->time_per_frame = (GST_SECOND / openh264enc->framerate);
openh264enc->previous_timestamp = frame->pts;
} else {
openh264enc->time_per_frame =