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.
parent ddee83ef
......@@ -494,6 +494,7 @@ gst_pcap_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
GST_CLOCK_TIME_IS_VALID (self->cur_ts)) {
GstSegment segment;
if (self->caps)
gst_pad_set_caps (self->src_pad, self->caps);
gst_segment_init (&segment, GST_FORMAT_TIME);
segment.start = self->cur_ts;
......@@ -607,7 +608,5 @@ gst_pcap_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
gst_object_unref (self);
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