mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
pipeline: Do not set EncodingProfile.presence when we have no track for the type
That leads to freeze as encodebin will be waiting for a pad and EOS forever
This commit is contained in:
parent
1108a2c6ac
commit
0e9c74bcb1
1 changed files with 15 additions and 2 deletions
|
@ -34,6 +34,8 @@
|
|||
#include "ges-internal.h"
|
||||
#include "ges-pipeline.h"
|
||||
#include "ges-screenshot.h"
|
||||
#include "ges-audio-track.h"
|
||||
#include "ges-video-track.h"
|
||||
|
||||
#define DEFAULT_TIMELINE_MODE GES_PIPELINE_MODE_PREVIEW
|
||||
|
||||
|
@ -860,11 +862,22 @@ ges_pipeline_set_render_settings (GESPipeline * pipeline,
|
|||
const GList *tmpprofiles =
|
||||
gst_encoding_container_profile_get_profiles
|
||||
(GST_ENCODING_CONTAINER_PROFILE (profile));
|
||||
GList *tmptrack, *tracks =
|
||||
ges_timeline_get_tracks (pipeline->priv->timeline);
|
||||
|
||||
for (; tmpprofiles; tmpprofiles = tmpprofiles->next) {
|
||||
GST_DEBUG_OBJECT (pipeline, "Setting presence to 1!");
|
||||
gst_encoding_profile_set_presence (tmpprofiles->data, 1);
|
||||
for (tmptrack = tracks; tmptrack; tmptrack = tmptrack->next) {
|
||||
if ((GST_IS_ENCODING_AUDIO_PROFILE (tmpprofiles->data) &&
|
||||
GES_IS_AUDIO_TRACK (tmptrack->data)) ||
|
||||
(GST_IS_ENCODING_VIDEO_PROFILE (tmpprofiles->data) &&
|
||||
GES_IS_VIDEO_TRACK (tmptrack->data))) {
|
||||
GST_DEBUG_OBJECT (pipeline, "Setting presence to 1!");
|
||||
gst_encoding_profile_set_presence (tmpprofiles->data, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_list_free_full (tracks, gst_object_unref);
|
||||
}
|
||||
|
||||
/* Clear previous URI sink if it existed */
|
||||
|
|
Loading…
Reference in a new issue