diff options
author | Nate Bogdanowicz <natezb@gmail.com> | 2013-02-02 11:55:52 -0800 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-02-05 14:28:09 +0100 |
commit | f4bf6ee5ce95238789a583c3d08cd5fd7a443e69 (patch) | |
tree | 674c405d839b9d11bacebf07d21ee9ac1f3eb5df | |
parent | 7c4c552acf3a82e41f62829c1bc2d06d6ceace20 (diff) |
gstpipeline: fix failed assertion caused by seeking pipeline with NULL clock
Under certain GST_STATE_CHANGED_PAUSED_TO_PLAYING transitions, a pipeline with
a NULL clock will fail an assertion due to an unchecked call to gst_object_ref().
This is fixed by simply adding a check and only ref-ing if the clock is not NULL.
https://bugzilla.gnome.org/show_bug.cgi?id=693065
-rw-r--r-- | gst/gstpipeline.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index 8612ae3e40..0694074e2b 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -421,7 +421,10 @@ gst_pipeline_change_state (GstElement * element, GstStateChange transition) } else { GST_DEBUG_OBJECT (pipeline, "Don't need to update clock, using old clock."); - clock = gst_object_ref (cur_clock); + /* only try to ref if cur_clock is not NULL */ + if (cur_clock) + gst_object_ref (cur_clock); + clock = cur_clock; } if (clock) { |