Commit b802dea8 authored by Wim Taymans's avatar Wim Taymans
Browse files

gst-libs/gst/audio/gstbaseaudiosink.c: Don't try to create invalid calibration...

gst-libs/gst/audio/gstbaseaudiosink.c: Don't try to create invalid calibration parameters by making the internal time...

Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_skew_slaving):
Don't try to create invalid calibration parameters by making the
internal time go backwards, instead make external time go forward.
parent 32a72762
2007-04-05 Wim Taymans <wim@fluendo.com>
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_skew_slaving):
Don't try to create invalid calibration parameters by making the
internal time go backwards, instead make external time go forward.
2007-04-05 Wim Taymans <wim@fluendo.com> 2007-04-05 Wim Taymans <wim@fluendo.com>
   
Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com> Patch by: Tommi Myöhänen <ext-tommi dot myohanen at nokia dot com>
...@@ -787,7 +787,7 @@ gst_base_audio_sink_skew_slaving (GstBaseAudioSink * sink, ...@@ -787,7 +787,7 @@ gst_base_audio_sink_skew_slaving (GstBaseAudioSink * sink,
/* adjust playout pointer based on skew */ /* adjust playout pointer based on skew */
if (sink->priv->avg_skew > segtime) { if (sink->priv->avg_skew > segtime) {
/* master is running slower */ /* master is running slower, move internal time forward */
GST_WARNING_OBJECT (sink, GST_WARNING_OBJECT (sink,
"correct clock skew %" G_GINT64_FORMAT " > %" G_GINT64_FORMAT, "correct clock skew %" G_GINT64_FORMAT " > %" G_GINT64_FORMAT,
sink->priv->avg_skew, segtime); sink->priv->avg_skew, segtime);
...@@ -797,11 +797,11 @@ gst_base_audio_sink_skew_slaving (GstBaseAudioSink * sink, ...@@ -797,11 +797,11 @@ gst_base_audio_sink_skew_slaving (GstBaseAudioSink * sink,
gst_clock_set_calibration (sink->provided_clock, cinternal, cexternal, gst_clock_set_calibration (sink->provided_clock, cinternal, cexternal,
crate_num, crate_denom); crate_num, crate_denom);
} else if (sink->priv->avg_skew < -segtime) { } else if (sink->priv->avg_skew < -segtime) {
/* master is running faster */ /* master is running faster, move external time forwards */
GST_WARNING_OBJECT (sink, GST_WARNING_OBJECT (sink,
"correct clock skew %" G_GINT64_FORMAT " < %" G_GINT64_FORMAT, "correct clock skew %" G_GINT64_FORMAT " < %" G_GINT64_FORMAT,
sink->priv->avg_skew, -segtime); sink->priv->avg_skew, -segtime);
cinternal -= segtime; cexternal += segtime;
sink->priv->avg_skew += segtime; sink->priv->avg_skew += segtime;
sink->next_sample = -1; sink->next_sample = -1;
gst_clock_set_calibration (sink->provided_clock, cinternal, cexternal, gst_clock_set_calibration (sink->provided_clock, cinternal, cexternal,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment