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,11 +950,13 @@ gst_audio_encoder_chain (GstPad * pad, GstBuffer * buffer)
gst_audio_encoder_drain (enc); gst_audio_encoder_drain (enc);
} }
} }
if (discont) {
/* now re-sync ts */ /* now re-sync ts */
priv->base_ts += diff; priv->base_ts += diff;
gst_audio_encoder_set_base_gp (enc); gst_audio_encoder_set_base_gp (enc);
priv->discont |= discont; priv->discont |= discont;
} }
}
gst_adapter_push (enc->priv->adapter, buffer); gst_adapter_push (enc->priv->adapter, buffer);
/* new stuff, so we can push subclass again */ /* new stuff, so we can push subclass again */