mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
fluidsynth: handle discont
This commit is contained in:
parent
803f564013
commit
f5230ab8ec
2 changed files with 10 additions and 0 deletions
|
@ -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) {
|
||||
|
|
|
@ -61,6 +61,7 @@ struct _GstFluidsynth
|
|||
int sf;
|
||||
|
||||
GstSegment segment;
|
||||
gboolean discont;
|
||||
GstClockTime last_pts;
|
||||
guint64 last_sample;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue