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

View file

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