nlesource: Fix seeks when used standalone
authorThibault Saunier <tsaunier@igalia.com>
Thu, 6 Feb 2020 15:43:57 +0000 (12:43 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Wed, 12 Feb 2020 20:50:37 +0000 (17:50 -0300)
The 'start' of nleobject is in the 'composition' scale, inpoint is in
the media scale, when outside a composition, a nleobject->start value
doesn't mean anything.

plugins/nle/nlesource.c

index 8fc9e71..18db65c 100644 (file)
@@ -539,7 +539,8 @@ nle_source_prepare (NleObject * object)
     source->priv->seek_event =
         gst_event_new_seek (1.0, GST_FORMAT_TIME,
         GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH,
-        GST_SEEK_TYPE_SET, object->start, GST_SEEK_TYPE_SET, object->stop);
+        GST_SEEK_TYPE_SET, object->inpoint, GST_SEEK_TYPE_SET,
+        object->inpoint + object->duration);
     g_mutex_unlock (&source->priv->seek_lock);
     GST_OBJECT_LOCK (source);
     priv->probeid = gst_pad_add_probe (pad,