diff --git a/ChangeLog b/ChangeLog index 55daa8aa2a..14752eb06d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-11-29 Michal Benes + + Reviewed by: Tim-Philipp Müller + + * gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_send_event): + * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_send_newsegment), + (gst_mpeg_parse_send_event): + Ref events before sending them to multiple pads, after all + gst_pad_send_event() takes ownership of events. Don't leak + events that have not been handled (fixes #322745). + 2005-11-28 Martin Soto * gst/mpegstream/gstdvddemux.c (gst_dvd_demux_handle_dvd_event) diff --git a/common b/common index b0b08bcd66..33084fbe05 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67 +Subproject commit 33084fbe0531733bc02aa1d9de608206d5553a15 diff --git a/gst/mpegstream/gstmpegdemux.c b/gst/mpegstream/gstmpegdemux.c index 01629fd009..07b02329fa 100644 --- a/gst/mpegstream/gstmpegdemux.c +++ b/gst/mpegstream/gstmpegdemux.c @@ -317,6 +317,8 @@ gst_mpeg_demux_send_event (GstMPEGParse * mpeg_parse, GstEvent * event, if (parent_class->send_event) return parent_class->send_event (mpeg_parse, event, time); + else + gst_event_unref (event); return TRUE; } diff --git a/gst/mpegstream/gstmpegparse.c b/gst/mpegstream/gstmpegparse.c index 351e0086c1..70484d551a 100644 --- a/gst/mpegstream/gstmpegparse.c +++ b/gst/mpegstream/gstmpegparse.c @@ -364,6 +364,7 @@ gst_mpeg_parse_send_newsegment (GstMPEGParse * mpeg_parse, gdouble rate, return CLASS (mpeg_parse)->send_event (mpeg_parse, event, start_time); } + gst_event_unref (event); return FALSE; } @@ -380,6 +381,7 @@ gst_mpeg_parse_send_event (GstMPEGParse * mpeg_parse, GstEvent * event, while (TRUE) { switch (gst_iterator_next (it, &pad)) { case GST_ITERATOR_OK: + gst_event_ref (event); gst_pad_push_event (GST_PAD (pad), event); gst_object_unref (GST_OBJECT (pad)); break; @@ -396,6 +398,7 @@ gst_mpeg_parse_send_event (GstMPEGParse * mpeg_parse, GstEvent * event, done: gst_iterator_free (it); + gst_event_unref (event); return ret; }