From 4713694082a86465fd4b63edc43777a601dbf72c Mon Sep 17 00:00:00 2001 From: Matej Knopp Date: Tue, 9 Dec 2014 03:18:37 +0100 Subject: [PATCH] audiorate: Fill gap events https://bugzilla.gnome.org/show_bug.cgi?id=741281 --- gst/audiorate/gstaudiorate.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gst/audiorate/gstaudiorate.c b/gst/audiorate/gstaudiorate.c index 9ac5beb803..783ff353e0 100644 --- a/gst/audiorate/gstaudiorate.c +++ b/gst/audiorate/gstaudiorate.c @@ -337,10 +337,19 @@ gst_audio_rate_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) res = gst_pad_push_event (audiorate->srcpad, event); break; case GST_EVENT_GAP: - /* no gaps after audiorate, ignore the event */ + { + /* Fill until end of gap */ + GstClockTime timestamp, duration; + gst_event_parse_gap (event, ×tamp, &duration); gst_event_unref (event); + if (GST_CLOCK_TIME_IS_VALID (timestamp)) { + if (GST_CLOCK_TIME_IS_VALID (duration)) + timestamp += duration; + gst_audio_rate_fill_to_time (audiorate, timestamp); + } res = TRUE; break; + } default: res = gst_pad_event_default (pad, parent, event); break;