structured-interface: Avoid setting invalid clip duration

This commit is contained in:
Thibault Saunier 2019-07-30 18:22:18 -07:00
parent badede6d1c
commit 43907adc1d

View file

@ -456,6 +456,11 @@ _ges_add_clip_from_struct (GESTimeline * timeline, GstStructure * structure,
goto beach; goto beach;
} }
if (GES_IS_URI_CLIP_ASSET (asset) && !GST_CLOCK_TIME_IS_VALID (duration)) {
duration = GST_CLOCK_DIFF (inpoint,
ges_uri_clip_asset_get_duration (GES_URI_CLIP_ASSET (asset)));
}
clip = ges_layer_add_asset (layer, asset, start, inpoint, duration, clip = ges_layer_add_asset (layer, asset, start, inpoint, duration,
track_types); track_types);