mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 05:01:23 +00:00
audiodecoder: use segment start as fallback ts if no other available
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=709965
This commit is contained in:
parent
5218956e8b
commit
387e5f0c14
1 changed files with 5 additions and 0 deletions
|
@ -1101,6 +1101,11 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf,
|
||||||
GST_DEBUG_OBJECT (dec, "base_ts now %" GST_TIME_FORMAT, GST_TIME_ARGS (ts));
|
GST_DEBUG_OBJECT (dec, "base_ts now %" GST_TIME_FORMAT, GST_TIME_ARGS (ts));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* still no valid ts, track the segment one */
|
||||||
|
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (priv->base_ts))) {
|
||||||
|
priv->base_ts = dec->output_segment.start;
|
||||||
|
}
|
||||||
|
|
||||||
/* slightly convoluted approach caters for perfect ts if subclass desires */
|
/* slightly convoluted approach caters for perfect ts if subclass desires */
|
||||||
if (GST_CLOCK_TIME_IS_VALID (ts)) {
|
if (GST_CLOCK_TIME_IS_VALID (ts)) {
|
||||||
if (dec->priv->tolerance > 0) {
|
if (dec->priv->tolerance > 0) {
|
||||||
|
|
Loading…
Reference in a new issue