From 7773e1eb5869d3cd4223da432ea1bdf1d8cfd51e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 31 Oct 2015 15:02:50 +0200 Subject: opusenc: Add some FIXME comments about calculating padding with LPC https://bugzilla.gnome.org/show_bug.cgi?id=757153 --- ext/opus/gstopusenc.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- cgit v1.2.1