Fix narrowing conversions

This commit is contained in:
Jonas Kvinge
2021-10-30 02:21:29 +02:00
parent a704412dee
commit 79ac53b2d9
111 changed files with 376 additions and 373 deletions

View File

@@ -122,7 +122,7 @@ GstElement *Transcoder::CreateElementForMimeType(const QString &element_type, co
if (intersection) {
if (!gst_caps_is_empty(intersection)) {
int rank = gst_plugin_feature_get_rank(GST_PLUGIN_FEATURE(factory));
int rank = static_cast<int>(gst_plugin_feature_get_rank(GST_PLUGIN_FEATURE(factory)));
QString name = GST_OBJECT_NAME(factory);
if (name.startsWith("ffmux") || name.startsWith("ffenc"))
@@ -552,7 +552,7 @@ QMap<QString, float> Transcoder::GetProgress() const {
gst_element_query_position(state->pipeline_, GST_FORMAT_TIME, &position);
gst_element_query_duration(state->pipeline_, GST_FORMAT_TIME, &duration);
ret[state->job_.input] = static_cast<float>(position) / duration;
ret[state->job_.input] = static_cast<float>(position) / static_cast<float>(duration);
}
return ret;