mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
gst/mpegstream/: Ref events before sending them to multiple pads, after all gst_pad_send_event() takes ownership of e...
Original commit message from CVS: Reviewed by: Tim-Philipp Müller <tim at centricular dot net> * 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).
This commit is contained in:
parent
4d652b147a
commit
ceb53c930c
4 changed files with 17 additions and 1 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2005-11-29 Michal Benes <michal dot benes at xeris dot cz>
|
||||
|
||||
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* 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 <martinsoto@users.sourceforge.net>
|
||||
|
||||
* gst/mpegstream/gstdvddemux.c (gst_dvd_demux_handle_dvd_event)
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit b0b08bcd66ca385364b6f90663585b09693aec67
|
||||
Subproject commit 33084fbe0531733bc02aa1d9de608206d5553a15
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue