pcapparse: Hook up the recently added change_state vfunc.
authorJan Schmidt <jan@centricular.com>
Thu, 17 Sep 2015 14:10:10 +0000 (00:10 +1000)
committerJan Schmidt <jan@centricular.com>
Thu, 17 Sep 2015 14:29:51 +0000 (00:29 +1000)
The state change function was implemented, but not installed,
making the compiler complain about the unused function.

gst/pcapparse/gstpcapparse.c

index 23eaff3..485ec43 100644 (file)
@@ -84,6 +84,8 @@ static void gst_pcap_parse_get_property (GObject * object, guint prop_id,
     GValue * value, GParamSpec * pspec);
 static void gst_pcap_parse_set_property (GObject * object, guint prop_id,
     const GValue * value, GParamSpec * pspec);
+static GstStateChangeReturn
+gst_pcap_parse_change_state (GstElement * element, GstStateChange transition);
 
 static void gst_pcap_parse_reset (GstPcapParse * self);
 
@@ -92,6 +94,7 @@ static GstFlowReturn gst_pcap_parse_chain (GstPad * pad,
 static gboolean gst_pcap_sink_event (GstPad * pad,
     GstObject * parent, GstEvent * event);
 
+
 #define parent_class gst_pcap_parse_parent_class
 G_DEFINE_TYPE (GstPcapParse, gst_pcap_parse, GST_TYPE_ELEMENT);
 
@@ -140,6 +143,8 @@ gst_pcap_parse_class_init (GstPcapParseClass * klass)
   gst_element_class_add_pad_template (element_class,
       gst_static_pad_template_get (&src_template));
 
+  element_class->change_state = gst_pcap_parse_change_state;
+
   gst_element_class_set_static_metadata (element_class, "PCapParse",
       "Raw/Parser",
       "Parses a raw pcap stream",
@@ -638,7 +643,7 @@ gst_pcap_parse_change_state (GstElement * element, GstStateChange transition)
 
   switch (transition) {
     case GST_STATE_CHANGE_PAUSED_TO_READY:
-      gst_pcap_parse_reset (element);
+      gst_pcap_parse_reset (self);
       break;
     default:
       break;