summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-10-31 15:02:50 +0200
committerSebastian Dröge <sebastian@centricular.com>2015-11-03 20:35:41 +0200
commit7773e1eb5869d3cd4223da432ea1bdf1d8cfd51e (patch)
tree51cf6ea122259857602a9f27ca802ca4d72abade
parent4df2ffaad608b632302e04d9be2fdd90ea6e1e31 (diff)
downloadgstreamer-plugins-base-7773e1eb5869d3cd4223da432ea1bdf1d8cfd51e.tar.gz
opusenc: Add some FIXME comments about calculating padding with LPC
https://bugzilla.gnome.org/show_bug.cgi?id=757153
-rw-r--r--ext/opus/gstopusenc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c
index 94c43ddf3..718643a68 100644
--- a/ext/opus/gstopusenc.c
+++ b/ext/opus/gstopusenc.c
@@ -960,6 +960,10 @@ gst_opus_enc_encode (GstOpusEnc * enc, GstBuffer * buf)
size = ((bsize / bytes) + 1) * bytes;
mdata = g_malloc0 (size);
+ /* FIXME: Instead of silence, use LPC with the last real samples.
+ * Otherwise we will create a discontinuity here, which will distort the
+ * last few encoded samples
+ */
memcpy (mdata, bdata, bsize);
data = mdata;
} else {
@@ -981,6 +985,10 @@ gst_opus_enc_encode (GstOpusEnc * enc, GstBuffer * buf)
}
} else {
if (enc->encoded_samples < enc->consumed_samples) {
+ /* FIXME: Instead of silence, use LPC with the last real samples.
+ * Otherwise we will create a discontinuity here, which will distort the
+ * last few encoded samples
+ */
data = mdata = g_malloc0 (bytes);
size = bytes;
output_samples = enc->consumed_samples - enc->encoded_samples;