diff --git a/gst/pcapparse/gstpcapparse.c b/gst/pcapparse/gstpcapparse.c index 1297c54695..069d75970e 100644 --- a/gst/pcapparse/gstpcapparse.c +++ b/gst/pcapparse/gstpcapparse.c @@ -494,7 +494,8 @@ gst_pcap_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) GST_CLOCK_TIME_IS_VALID (self->cur_ts)) { GstSegment segment; - gst_pad_set_caps (self->src_pad, self->caps); + if (self->caps) + gst_pad_set_caps (self->src_pad, self->caps); gst_segment_init (&segment, GST_FORMAT_TIME); segment.start = self->cur_ts; gst_pad_push_event (self->src_pad, @@ -607,7 +608,5 @@ gst_pcap_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) break; } - gst_object_unref (self); - return ret; }