uri-clip: Copy previous track elements bindings when setting a new asset

Fixes https://phabricator.freedesktop.org/T7862
This commit is contained in:
Thibault Saunier 2017-11-25 15:56:36 -03:00
parent af40ec08fc
commit a97ab50ab9

View file

@ -319,10 +319,15 @@ extractable_set_asset (GESExtractable * self, GESAsset * asset)
if (GES_IS_SOURCE (tmp->data)) {
GESTrack *track = ges_track_element_get_track (tmp->data);
if (track->type == GES_TRACK_TYPE_AUDIO && audio_source)
if (track->type == GES_TRACK_TYPE_AUDIO && audio_source) {
ges_track_element_copy_properties (audio_source, tmp->data);
else if (track->type == GES_TRACK_TYPE_VIDEO && video_source)
ges_track_element_copy_bindings (GES_TRACK_ELEMENT (audio_source),
tmp->data, GST_CLOCK_TIME_NONE);
} else if (track->type == GES_TRACK_TYPE_VIDEO && video_source) {
ges_track_element_copy_properties (video_source, tmp->data);
ges_track_element_copy_bindings (GES_TRACK_ELEMENT (video_source),
tmp->data, GST_CLOCK_TIME_NONE);
}
}
}