diff options
author | Zaheer Abbas Merali <zaheermerali@gmail.com> | 2013-08-14 10:47:31 +0200 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2013-08-14 10:48:26 +0200 |
commit | 131c263248a537b5c482775f5a1e3822e30f1466 (patch) | |
tree | dd9a623bc406dbe35827520e7bd941109c947cc4 /gst/pcapparse | |
parent | ddee83ef0bc13ce888a890f29650454e2c7ec496 (diff) | |
download | gstreamer-plugins-bad-131c263248a537b5c482775f5a1e3822e30f1466.tar.gz |
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
Diffstat (limited to 'gst/pcapparse')
-rw-r--r-- | gst/pcapparse/gstpcapparse.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gst/pcapparse/gstpcapparse.c b/gst/pcapparse/gstpcapparse.c index 1297c5469..069d75970 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; } |