diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index f1ed51da2e..cac3145508 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -504,13 +504,14 @@ discoverer_discovered_cb (GstDiscoverer * discoverer, /* FIXME : Handle errors in discovery */ stream_list = gst_discoverer_info_get_stream_list (info); + tfs_supportedformats = ges_timeline_filesource_get_supported_formats (tfs); + if (tfs_supportedformats != GES_TRACK_TYPE_UNKNOWN) + goto check_image; + /* Update timelinefilesource properties based on info */ for (tmp = stream_list; tmp; tmp = tmp->next) { GstDiscovererStreamInfo *sinf = (GstDiscovererStreamInfo *) tmp->data; - tfs_supportedformats = - ges_timeline_filesource_get_supported_formats (tfs); - if (GST_IS_DISCOVERER_AUDIO_INFO (sinf)) { tfs_supportedformats |= GES_TRACK_TYPE_AUDIO; ges_timeline_filesource_set_supported_formats (tfs, @@ -532,6 +533,8 @@ discoverer_discovered_cb (GstDiscoverer * discoverer, if (stream_list) gst_discoverer_stream_info_list_free (stream_list); + check_image: + if (is_image) { /* don't set max-duration on still images */ g_object_set (tfs, "is_image", (gboolean) TRUE, NULL);