summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatej Knopp <matej.knopp@gmail.com>2014-12-09 03:18:37 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-06-10 19:27:23 +0100
commit39b7b6ad2b3df991b97bb8db66072714c10da7bd (patch)
tree6f329023f74193fb0109a8bb31669d2524eff22c
parentd6e351cf8a3400a2f0b391263a624306e56b3045 (diff)
audiorate: Fill gap events
https://bugzilla.gnome.org/show_bug.cgi?id=741281
-rw-r--r--gst/audiorate/gstaudiorate.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gst/audiorate/gstaudiorate.c b/gst/audiorate/gstaudiorate.c
index 9ac5beb80..783ff353e 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, &timestamp, &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;