diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-05-18 15:43:20 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2011-05-18 15:43:20 +0200 |
commit | b1676b8c3056f6c9a303d942dcd8402d12649a13 (patch) | |
tree | ae1f0de1766ba0fd3a43d1a83372316999317f17 | |
parent | fa6bcde7e378ee476a7f40d89cdd2c0559bdd98e (diff) |
event: fix event copy
Fix parent refcount on event copy.
Fix unit test.
-rw-r--r-- | gst/gstevent.c | 3 | ||||
-rw-r--r-- | tests/check/gst/gstevent.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/gst/gstevent.c b/gst/gstevent.c index 123cdae17..ca066a38a 100644 --- a/gst/gstevent.c +++ b/gst/gstevent.c @@ -241,7 +241,8 @@ _gst_event_copy (GstEvent * event) s = GST_EVENT_STRUCTURE (event); if (s) { GST_EVENT_STRUCTURE (copy) = gst_structure_copy (s); - gst_structure_set_parent_refcount (s, ©->event.mini_object.refcount); + gst_structure_set_parent_refcount (GST_EVENT_STRUCTURE (copy), + ©->event.mini_object.refcount); } return GST_EVENT_CAST (copy); } diff --git a/tests/check/gst/gstevent.c b/tests/check/gst/gstevent.c index 1221b8e07..ac09c288b 100644 --- a/tests/check/gst/gstevent.c +++ b/tests/check/gst/gstevent.c @@ -123,7 +123,7 @@ GST_START_TEST (create_events) fail_unless (ctd1 == ctd2); fail_unless (ct1 == ct2); gst_event_parse_qos (event, &t2, &p2, &ctd2, &ct2); - fail_unless (t2 == GST_QOS_TYPE_UNDERFLOW); + fail_unless (t2 == GST_QOS_TYPE_THROTTLE); fail_unless (p1 == p2); fail_unless (ctd1 == ctd2); fail_unless (ct1 == ct2); @@ -132,7 +132,7 @@ GST_START_TEST (create_events) ctd1 = G_GINT64_CONSTANT (-10); event = gst_event_new_qos (t1, p1, ctd1, ct1); gst_event_parse_qos (event, &t2, &p2, &ctd2, &ct2); - fail_unless (t2 == GST_QOS_TYPE_OVERFLOW); + fail_unless (t2 == GST_QOS_TYPE_THROTTLE); gst_event_unref (event); event = gst_event_new_qos (t1, p1, ctd1, ct1); |