dtmf: fix compiler warning for uninitialized values

This commit is contained in:
Thijs Vermeir 2011-11-09 11:56:07 +01:00
parent d937da4c0c
commit 8529526c54
2 changed files with 8 additions and 6 deletions

View file

@ -641,7 +641,7 @@ static void
gst_dtmf_src_post_message (GstDTMFSrc * dtmfsrc, const gchar * message_name, gst_dtmf_src_post_message (GstDTMFSrc * dtmfsrc, const gchar * message_name,
GstDTMFSrcEvent * event) GstDTMFSrcEvent * event)
{ {
GstStructure *s; GstStructure *s = NULL;
switch (event->event_type) { switch (event->event_type) {
case DTMF_EVENT_TYPE_START: case DTMF_EVENT_TYPE_START:
@ -661,8 +661,9 @@ gst_dtmf_src_post_message (GstDTMFSrc * dtmfsrc, const gchar * message_name,
return; return;
} }
gst_element_post_message (GST_ELEMENT (dtmfsrc), if (s)
gst_message_new_element (GST_OBJECT (dtmfsrc), s)); gst_element_post_message (GST_ELEMENT (dtmfsrc),
gst_message_new_element (GST_OBJECT (dtmfsrc), s));
} }
static GstFlowReturn static GstFlowReturn

View file

@ -665,7 +665,7 @@ static void
gst_dtmf_src_post_message (GstRTPDTMFSrc * dtmfsrc, const gchar * message_name, gst_dtmf_src_post_message (GstRTPDTMFSrc * dtmfsrc, const gchar * message_name,
GstRTPDTMFSrcEvent * event) GstRTPDTMFSrcEvent * event)
{ {
GstStructure *s; GstStructure *s = NULL;
switch (event->event_type) { switch (event->event_type) {
case RTP_DTMF_EVENT_TYPE_START: case RTP_DTMF_EVENT_TYPE_START:
@ -685,8 +685,9 @@ gst_dtmf_src_post_message (GstRTPDTMFSrc * dtmfsrc, const gchar * message_name,
return; return;
} }
gst_element_post_message (GST_ELEMENT (dtmfsrc), if (s)
gst_message_new_element (GST_OBJECT (dtmfsrc), s)); gst_element_post_message (GST_ELEMENT (dtmfsrc),
gst_message_new_element (GST_OBJECT (dtmfsrc), s));
} }