mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
baseaudioencoder: TEMP; avoid some imperfect ts jitter ?
... even when not in perfect mode ?
This commit is contained in:
parent
5a40343102
commit
ecf57f2b73
1 changed files with 10 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
if (TRUE || diff > GST_SECOND / ctx->state.rate / 2 ||
|
||||||
|
diff < -GST_SECOND / ctx->state.rate / 2) {
|
||||||
GST_LOG_OBJECT (enc, "new upstream ts %" GST_TIME_FORMAT
|
GST_LOG_OBJECT (enc, "new upstream ts %" GST_TIME_FORMAT
|
||||||
" at distance %" G_GUINT64_FORMAT, GST_TIME_ARGS (ts), distance);
|
" at distance %" G_GUINT64_FORMAT, GST_TIME_ARGS (ts), distance);
|
||||||
/* re-sync to upstream ts */
|
/* re-sync to upstream ts */
|
||||||
priv->base_ts = ts;
|
priv->base_ts = ts;
|
||||||
priv->samples = distance;
|
priv->samples = distance;
|
||||||
|
} else {
|
||||||
|
GST_LOG_OBJECT (enc, "new upstream ts only introduces jitter");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* advance sample view */
|
/* advance sample view */
|
||||||
|
|
Loading…
Reference in a new issue