Fix narrowing conversions
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user