nlecomposition: Fix the get_current_position method

This commit is contained in:
Thibault Saunier 2014-09-25 14:53:36 +02:00
parent d419bccf4f
commit 6a371b308b

View file

@ -1382,11 +1382,15 @@ get_current_position (NleComposition * comp)
beach: beach:
if (!GST_CLOCK_TIME_IS_VALID (value)) {
if (GST_CLOCK_TIME_IS_VALID (comp->priv->segment_start)) { if (GST_CLOCK_TIME_IS_VALID (comp->priv->segment_start)) {
value = comp->priv->segment_start;
} else {
GST_INFO_OBJECT (comp, "Current position is unknown, " "setting it to 0"); GST_INFO_OBJECT (comp, "Current position is unknown, " "setting it to 0");
value = 0; value = 0;
} }
}
return (guint64) value; return (guint64) value;
} }