Commit 131c2632 authored by Zaheer Abbas Merali's avatar Zaheer Abbas Merali Committed by Sebastian Dröge
Browse files

pcapparse: Remove unneeded unref and only set pad caps if we have caps

Fixes crashes due to invalid unrefs.

https://bugzilla.gnome.org/show_bug.cgi?id=705957
parent ddee83ef
...@@ -494,7 +494,8 @@ gst_pcap_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) ...@@ -494,7 +494,8 @@ gst_pcap_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
GST_CLOCK_TIME_IS_VALID (self->cur_ts)) { GST_CLOCK_TIME_IS_VALID (self->cur_ts)) {
GstSegment segment; 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); gst_segment_init (&segment, GST_FORMAT_TIME);
segment.start = self->cur_ts; segment.start = self->cur_ts;
gst_pad_push_event (self->src_pad, gst_pad_push_event (self->src_pad,
...@@ -607,7 +608,5 @@ gst_pcap_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) ...@@ -607,7 +608,5 @@ gst_pcap_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
break; break;
} }
gst_object_unref (self);
return ret; return ret;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment