player: Only report the initial duration if the query was successful
This commit is contained in:
parent
214a041e13
commit
fa31ea7ac3
@ -1590,8 +1590,10 @@ state_changed_cb (G_GNUC_UNUSED GstBus * bus, GstMessage * msg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_video_dimensions_changed (self);
|
check_video_dimensions_changed (self);
|
||||||
gst_element_query_duration (self->playbin, GST_FORMAT_TIME, &duration);
|
if (gst_element_query_duration (self->playbin, GST_FORMAT_TIME,
|
||||||
emit_duration_changed (self, duration);
|
&duration)) {
|
||||||
|
emit_duration_changed (self, duration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_state == GST_STATE_PAUSED
|
if (new_state == GST_STATE_PAUSED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user