mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 10:40:34 +00:00
track-element: Avoid dereferencing NULL pointer
We set TrackElement track type very early when creating effects so it now uses that information to find TrackElement in clips by track type. Reviewed-by: Alex Băluț <alexandru.balut@gmail.com> Differential Revision: https://phabricator.freedesktop.org/D1370
This commit is contained in:
parent
aec1442d4c
commit
4432efcfad
2 changed files with 3 additions and 1 deletions
|
@ -1623,7 +1623,7 @@ ges_clip_find_track_elements (GESClip * clip, GESTrack * track,
|
|||
tmptrack = ges_track_element_get_track (otmp);
|
||||
if (((track != NULL && tmptrack == track)) ||
|
||||
(track_type != GES_TRACK_TYPE_UNKNOWN
|
||||
&& tmptrack->type == track_type)) {
|
||||
&& ges_track_element_get_track_type (otmp) == track_type)) {
|
||||
|
||||
foundElement = GES_TRACK_ELEMENT (tmp->data);
|
||||
|
||||
|
|
|
@ -815,6 +815,8 @@ ges_track_element_set_track (GESTrackElement * object, GESTrack * track)
|
|||
object->priv->track = track;
|
||||
|
||||
if (object->priv->track) {
|
||||
ges_track_element_set_track_type (object, track->type);
|
||||
|
||||
g_object_set (object->priv->nleobject,
|
||||
"caps", ges_track_get_caps (object->priv->track), NULL);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue