diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-03-22 13:48:03 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-03-22 13:48:03 +0100 |
commit | f5230ab8ecd7051abf24def778ce68aad0e7123f (patch) | |
tree | 666f2c502e424231c1941a1125edb6768314caa1 /ext/fluidsynth | |
parent | 803f5640138c4a117d93fb2118a26837288f5d4a (diff) |
fluidsynth: handle discont
Diffstat (limited to 'ext/fluidsynth')
-rw-r--r-- | ext/fluidsynth/gstfluidsynth.c | 9 | ||||
-rw-r--r-- | ext/fluidsynth/gstfluidsynth.h | 1 |
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; }; |