audioencoder: only resync to upstream upon discont in perfect ts mode

... as documented, where discont is marked here if tolerance has been
exceeded.
This commit is contained in:
Mark Nauwelaerts 2011-10-08 20:13:11 +02:00
parent a7ce550d04
commit 871b1584c9

View file

@ -950,10 +950,12 @@ gst_audio_encoder_chain (GstPad * pad, GstBuffer * buffer)
gst_audio_encoder_drain (enc); gst_audio_encoder_drain (enc);
} }
} }
/* now re-sync ts */ if (discont) {
priv->base_ts += diff; /* now re-sync ts */
gst_audio_encoder_set_base_gp (enc); priv->base_ts += diff;
priv->discont |= discont; gst_audio_encoder_set_base_gp (enc);
priv->discont |= discont;
}
} }
gst_adapter_push (enc->priv->adapter, buffer); gst_adapter_push (enc->priv->adapter, buffer);