fluidsynth: handle discont

This commit is contained in:
Wim Taymans 2013-03-22 13:48:03 +01:00
parent 803f564013
commit f5230ab8ec
2 changed files with 10 additions and 0 deletions

View file

@ -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) {

View file

@ -61,6 +61,7 @@ struct _GstFluidsynth
int sf;
GstSegment segment;
gboolean discont;
GstClockTime last_pts;
guint64 last_sample;
};