baseaudioencoder: TEMP; avoid some imperfect ts jitter ?

... even when not in perfect mode ?
This commit is contained in:
Mark Nauwelaerts 2011-06-17 11:54:08 +02:00 committed by Tim-Philipp Müller
parent 5a40343102
commit ecf57f2b73

View file

@ -500,11 +500,16 @@ gst_base_audio_encoder_finish_frame (GstBaseAudioEncoder * enc, GstBuffer * buf,
GST_DEBUG_OBJECT (enc, "marked discont"); GST_DEBUG_OBJECT (enc, "marked discont");
priv->discont = TRUE; priv->discont = TRUE;
} }
GST_LOG_OBJECT (enc, "new upstream ts %" GST_TIME_FORMAT if (TRUE || diff > GST_SECOND / ctx->state.rate / 2 ||
" at distance %" G_GUINT64_FORMAT, GST_TIME_ARGS (ts), distance); diff < -GST_SECOND / ctx->state.rate / 2) {
/* re-sync to upstream ts */ GST_LOG_OBJECT (enc, "new upstream ts %" GST_TIME_FORMAT
priv->base_ts = ts; " at distance %" G_GUINT64_FORMAT, GST_TIME_ARGS (ts), distance);
priv->samples = distance; /* re-sync to upstream ts */
priv->base_ts = ts;
priv->samples = distance;
} else {
GST_LOG_OBJECT (enc, "new upstream ts only introduces jitter");
}
} }
} }
/* advance sample view */ /* advance sample view */