ges: don't reset the supported formats in the timeline when they're already set

My mom never told me goto was evil
This commit is contained in:
Mathieu Duponchelle 2011-08-28 01:13:20 +02:00 committed by Thibault Saunier
parent 7bb8e6f951
commit 31688a9354

View file

@ -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);