diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-10-27 09:25:20 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-10-27 23:06:26 +0530 |
commit | bb0a83b0185ab789e06dec16869e587d839414fa (patch) | |
tree | 2b00d6509bce8bdffaa55f065db79c31bebc6908 /ext/openh264 | |
parent | f7908637554ff5f8ce60938e9c56962644ea71d3 (diff) | |
download | gstreamer-plugins-bad-bb0a83b0185ab789e06dec16869e587d839414fa.tar.gz |
plugins: Use explicit type conversion from enums
MSVC warns about this because it's a C++ compiler, and this actually
results in useful things such as the incorrect 'gboolean' return value
for functions that return GstFlowReturn, so let's do explicit
conversions to reduce the noise and increase its efficacy.
Diffstat (limited to 'ext/openh264')
-rw-r--r-- | ext/openh264/gstopenh264enc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/openh264/gstopenh264enc.cpp b/ext/openh264/gstopenh264enc.cpp index a5e488f6a..ad1812046 100644 --- a/ext/openh264/gstopenh264enc.cpp +++ b/ext/openh264/gstopenh264enc.cpp @@ -794,9 +794,9 @@ gst_openh264enc_handle_frame (GstVideoEncoder * encoder, openh264enc->time_per_frame = (GST_SECOND / openh264enc->framerate); openh264enc->previous_timestamp = frame->pts; } else { - openh264enc->time_per_frame = - openh264enc->time_per_frame * 0.8 + (frame->pts - - openh264enc->previous_timestamp) * 0.2; + openh264enc->time_per_frame = (guint64) + (openh264enc->time_per_frame * 0.8 + (frame->pts - + openh264enc->previous_timestamp) * 0.2); openh264enc->previous_timestamp = frame->pts; if (openh264enc->frame_count % 10 == 0) { fps = GST_SECOND / (gdouble) openh264enc->time_per_frame; |