celtenc: fix calculation of filler data size

https://bugzilla.gnome.org/show_bug.cgi?id=660469
This commit is contained in:
Vincent Penquerc'h 2011-09-29 14:22:53 +01:00
parent 4a4b1f472e
commit ac95f56d2e

View file

@ -820,7 +820,7 @@ gst_celt_enc_encode (GstCeltEnc * enc, gboolean flush)
} }
if (flush && gst_adapter_available (enc->adapter) % bytes != 0) { if (flush && gst_adapter_available (enc->adapter) % bytes != 0) {
guint diff = gst_adapter_available (enc->adapter) % bytes; guint diff = bytes - gst_adapter_available (enc->adapter) % bytes;
GstBuffer *buf = gst_buffer_new_and_alloc (diff); GstBuffer *buf = gst_buffer_new_and_alloc (diff);
memset (GST_BUFFER_DATA (buf), 0, diff); memset (GST_BUFFER_DATA (buf), 0, diff);