+2006-01-17 Jan Schmidt <thaytan@mad.scientist.com>
+
+ * gst-libs/gst/audio/gstbaseaudiosink.c:
+ (gst_base_audio_sink_render):
+ Fix playback of non-synchronised streams by assuming a rate
+ of 1.0 instead of a random one.
+
+ Makes this work again:
+
+ gst-launch filesrc location=raw_audio.file ! 'audio/x-raw-int,
+ endianness=(int)4321, signed=(boolean)true, width=(int)16,
+ depth=(int)16, rate=(int)44100, channels=(int)2' ! audioconvert !
+ audioresample ! alsasink
+
=== release 0.10.2 ===
2006-01-16 Thomas Vander Stichele <thomas at apestaart dot org>
guint size;
guint samples;
gint bps;
- gdouble crate;
+ gdouble crate = 1.0;
GstClockTime crate_num;
GstClockTime crate_denom;
GstClockTime cinternal, cexternal;
* sample ASAP */
if (!GST_CLOCK_TIME_IS_VALID (time) || !bsink->sync) {
render_offset = gst_base_audio_sink_get_offset (sink);
+ GST_DEBUG ("Buffer of size %u has no time. Using render_offset=%"
+ G_GUINT64_FORMAT, GST_BUFFER_SIZE (buf), render_offset);
goto no_sync;
}
GST_DEBUG ("resync");
}
-no_sync:
crate = ((gdouble) crate_num) / crate_denom;
GST_DEBUG_OBJECT (sink,
"internal %" G_GUINT64_FORMAT ", %" G_GUINT64_FORMAT ", rate %g",
cinternal, cexternal, crate);
-
+no_sync:
/* clip length based on rate */
samples = MIN (samples, samples / (crate * ABS (bsink->segment.rate)));