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

Thibault Saunier tsaunier at kemper.freedesktop.org
Wed Jan 11 07:04:32 PST 2012


Module: gst-editing-services
Branch: master
Commit: 31688a93544bca82365638fa6f33501829e7c90c
URL:    http://cgit.freedesktop.org/gstreamer/gst-editing-services/commit/?id=31688a93544bca82365638fa6f33501829e7c90c

Author: Mathieu Duponchelle <seeed at laposte.net>
Date:   Sun Aug 28 01:13:20 2011 +0200

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

My mom never told me goto was evil

---

 ges/ges-timeline.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c
index f1ed51d..cac3145 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);



More information about the gstreamer-commits mailing list