+2007-05-24 Wim Taymans <wim@fluendo.com>
+
+ * gst-libs/gst/audio/gstbaseaudiosink.c:
+ (gst_base_audio_sink_render):
+ After an interrupt (PAUSED/flush) assume that the next sample should not
+ be aligned to the previous sample. Fixes #417992.
+
2007-05-24 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
gint bps;
gint accum;
gint out_samples;
- GstClockTime base_time, latency;
+ GstClockTime base_time = -1, latency;
GstClock *clock;
- gboolean sync, slaved;
+ gboolean sync, slaved, align_next;
sink = GST_BASE_AUDIO_SINK (bsink);
/* we need to accumulate over different runs for when we get interrupted */
accum = 0;
+ align_next = TRUE;
do {
written =
gst_ring_buffer_commit_full (ringbuf, &sample_offset, data, samples,
if (gst_base_sink_wait_preroll (bsink) != GST_FLOW_OK)
goto stopping;
+ /* if we got interrupted, we cannot assume that the next sample should
+ * be aligned to this one */
+ align_next = FALSE;
+
samples -= written;
data += written * bps;
} while (TRUE);
- sink->next_sample = sample_offset;
+ if (align_next)
+ sink->next_sample = sample_offset;
+ else
+ sink->next_sample = -1;
GST_DEBUG_OBJECT (sink, "next sample expected at %" G_GUINT64_FORMAT,
sink->next_sample);