summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/fluidsynth/gstfluidsynth.c9
-rw-r--r--ext/fluidsynth/gstfluidsynth.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/ext/fluidsynth/gstfluidsynth.c b/ext/fluidsynth/gstfluidsynth.c
index f7d4df116..3f96f7f6b 100644
--- a/ext/fluidsynth/gstfluidsynth.c
+++ b/ext/fluidsynth/gstfluidsynth.c
@@ -382,6 +382,11 @@ produce_samples (GstFluidsynth * fluidsynth, GstClockTime pts, guint64 sample)
GST_BUFFER_OFFSET (outbuf) = offset;
GST_BUFFER_OFFSET_END (outbuf) = offset + samples;
+ if (fluidsynth->discont) {
+ GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
+ fluidsynth->discont = FALSE;
+ }
+
return gst_pad_push (fluidsynth->srcpad, outbuf);
}
@@ -471,6 +476,10 @@ gst_fluidsynth_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buffer)
fluidsynth = GST_FLUIDSYNTH (parent);
+ if (GST_BUFFER_IS_DISCONT (buffer)) {
+ fluidsynth->discont = TRUE;
+ }
+
pts = GST_BUFFER_PTS (buffer);
if (pts != GST_CLOCK_TIME_NONE) {
diff --git a/ext/fluidsynth/gstfluidsynth.h b/ext/fluidsynth/gstfluidsynth.h
index 924cf0090..3344bd8e3 100644
--- a/ext/fluidsynth/gstfluidsynth.h
+++ b/ext/fluidsynth/gstfluidsynth.h
@@ -61,6 +61,7 @@ struct _GstFluidsynth
int sf;
GstSegment segment;
+ gboolean discont;
GstClockTime last_pts;
guint64 last_sample;
};