From 221be0ea0661b38f255dae9a07b2d9d30187e4ae Mon Sep 17 00:00:00 2001 From: "zeeshan.ali@nokia.com" Date: Thu, 15 Feb 2007 12:26:55 +0000 Subject: [PATCH] [MOVED FROM GST-P-FARSIGHT] Attempt to correct event handling 20070215122655-65035-47070d9a28c08d9353b04d2d9301e29b7ee72b83.gz --- gst/rtpdtmf/gstrtpdtmfsrc.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gst/rtpdtmf/gstrtpdtmfsrc.c b/gst/rtpdtmf/gstrtpdtmfsrc.c index d535271..464b34d 100644 --- a/gst/rtpdtmf/gstrtpdtmfsrc.c +++ b/gst/rtpdtmf/gstrtpdtmfsrc.c @@ -272,11 +272,14 @@ gst_rtp_dtmf_src_handle_event (GstPad * pad, GstEvent * event) } } + result = TRUE; break; } - case GST_EVENT_FLUSH_STOP: - result = gst_pad_event_default (pad, event); - gst_segment_init (&dtmfsrc->segment, GST_FORMAT_UNDEFINED); + /* Ideally this element should not be flushed but let's handle the event + * just in case it is */ + case GST_EVENT_FLUSH_START: + gst_rtp_dtmf_src_stop (dtmfsrc); + result = TRUE; break; case GST_EVENT_NEWSEGMENT: { @@ -289,7 +292,8 @@ gst_rtp_dtmf_src_handle_event (GstPad * pad, GstEvent * event) &position); gst_segment_set_newsegment (&dtmfsrc->segment, update, rate, fmt, start, stop, position); - + + result = TRUE; break; } default: -- 2.7.4