mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 13:08:49 +00:00
gst/mpegstream/gstmpegparse.c: Don't unref event unconditionally after giving away ownership (gst_pad_push_event(), g...
Original commit message from CVS: * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_handle_src_event): Don't unref event unconditionally after giving away ownership (gst_pad_push_event(), gst_pad_send_event() and gst_pad_event_default() take ownership of the event passed to them). Fixes warnings/crashes caused by navigation events.
This commit is contained in:
parent
def240435e
commit
698b9ab2ae
2 changed files with 14 additions and 7 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2006-03-29 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_handle_src_event):
|
||||||
|
Don't unref event unconditionally after giving away ownership
|
||||||
|
(gst_pad_push_event(), gst_pad_send_event() and
|
||||||
|
gst_pad_event_default() take ownership of the event
|
||||||
|
passed to them). Fixes warnings/crashes caused by
|
||||||
|
navigation events.
|
||||||
|
|
||||||
2006-03-28 Tim-Philipp Müller <tim at centricular dot net>
|
2006-03-28 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_send_subbuffer):
|
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_send_subbuffer):
|
||||||
|
|
|
@ -1181,12 +1181,11 @@ gst_mpeg_parse_handle_src_event (GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
GstMPEGParse *mpeg_parse = GST_MPEG_PARSE (gst_pad_get_parent (pad));
|
GstMPEGParse *mpeg_parse = GST_MPEG_PARSE (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
GST_INFO_OBJECT (mpeg_parse, "Event received");
|
GST_LOG_OBJECT (mpeg_parse, "got %s event", GST_EVENT_TYPE_NAME (event));
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_SEEK:
|
case GST_EVENT_SEEK:
|
||||||
{
|
{
|
||||||
GST_INFO_OBJECT (mpeg_parse, "Seek event received");
|
|
||||||
|
|
||||||
#ifdef FIXME
|
#ifdef FIXME
|
||||||
/* First try to use the index if we have one. */
|
/* First try to use the index if we have one. */
|
||||||
if (mpeg_parse->index) {
|
if (mpeg_parse->index) {
|
||||||
|
@ -1200,12 +1199,12 @@ gst_mpeg_parse_handle_src_event (GstPad * pad, GstEvent * event)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!upstream) {
|
if (!upstream) {
|
||||||
|
gst_event_unref (event);
|
||||||
res = FALSE;
|
res = FALSE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_pad_push_event (pad, upstream);
|
res = gst_pad_event_default (pad, upstream);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_NAVIGATION:
|
case GST_EVENT_NAVIGATION:
|
||||||
|
@ -1213,14 +1212,13 @@ gst_mpeg_parse_handle_src_event (GstPad * pad, GstEvent * event)
|
||||||
res = gst_pad_push_event (mpeg_parse->sinkpad, event);
|
res = gst_pad_push_event (mpeg_parse->sinkpad, event);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
res = FALSE;
|
res = gst_pad_event_default (pad, event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
gst_object_unref (mpeg_parse);
|
gst_object_unref (mpeg_parse);
|
||||||
|
|
||||||
gst_event_unref (event);
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue