mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
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:
parent
7bb8e6f951
commit
31688a9354
1 changed files with 6 additions and 3 deletions
|
@ -504,13 +504,14 @@ discoverer_discovered_cb (GstDiscoverer * discoverer,
|
||||||
/* FIXME : Handle errors in discovery */
|
/* FIXME : Handle errors in discovery */
|
||||||
stream_list = gst_discoverer_info_get_stream_list (info);
|
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 */
|
/* Update timelinefilesource properties based on info */
|
||||||
for (tmp = stream_list; tmp; tmp = tmp->next) {
|
for (tmp = stream_list; tmp; tmp = tmp->next) {
|
||||||
GstDiscovererStreamInfo *sinf = (GstDiscovererStreamInfo *) tmp->data;
|
GstDiscovererStreamInfo *sinf = (GstDiscovererStreamInfo *) tmp->data;
|
||||||
|
|
||||||
tfs_supportedformats =
|
|
||||||
ges_timeline_filesource_get_supported_formats (tfs);
|
|
||||||
|
|
||||||
if (GST_IS_DISCOVERER_AUDIO_INFO (sinf)) {
|
if (GST_IS_DISCOVERER_AUDIO_INFO (sinf)) {
|
||||||
tfs_supportedformats |= GES_TRACK_TYPE_AUDIO;
|
tfs_supportedformats |= GES_TRACK_TYPE_AUDIO;
|
||||||
ges_timeline_filesource_set_supported_formats (tfs,
|
ges_timeline_filesource_set_supported_formats (tfs,
|
||||||
|
@ -532,6 +533,8 @@ discoverer_discovered_cb (GstDiscoverer * discoverer,
|
||||||
if (stream_list)
|
if (stream_list)
|
||||||
gst_discoverer_stream_info_list_free (stream_list);
|
gst_discoverer_stream_info_list_free (stream_list);
|
||||||
|
|
||||||
|
check_image:
|
||||||
|
|
||||||
if (is_image) {
|
if (is_image) {
|
||||||
/* don't set max-duration on still images */
|
/* don't set max-duration on still images */
|
||||||
g_object_set (tfs, "is_image", (gboolean) TRUE, NULL);
|
g_object_set (tfs, "is_image", (gboolean) TRUE, NULL);
|
||||||
|
|
Loading…
Reference in a new issue