avwait: Fix crash when explicitly setting end_tc to NULL

If end_tc is NULL, it means that we don't want avwait to stop at any
timecode. When explicitly setting end_tc to NULL, there is no point in
comparing end_tc with start_tc (to see if we'll reject end_tc for being
before start_tc), so the check in question is completely disabled
instead of letting it crash.
This commit is contained in:
Vivia Nikolaidou 2017-11-07 21:03:22 +02:00
parent 6552981b79
commit 503403ff0a

View file

@ -434,7 +434,7 @@ gst_avwait_set_property (GObject * object, guint prop_id,
if (self->end_tc)
gst_video_time_code_free (self->end_tc);
self->end_tc = g_value_dup_boxed (value);
if (self->tc
if (self->tc && self->end_tc
&& gst_video_time_code_compare (self->tc, self->end_tc) != -1) {
gchar *start_tc, *end_tc;