Commit 45b6d734 authored by Michael Smith's avatar Michael Smith

ext/vorbis/vorbisenc.c: If we get a zero-sized input buffer, don't pass it to...

ext/vorbis/vorbisenc.c: If we get a zero-sized input buffer, don't pass it to libvorbis, as that marks EOS internally...

Original commit message from CVS:
* ext/vorbis/vorbisenc.c: (gst_vorbis_enc_chain):
If we get a zero-sized input buffer, don't pass it to libvorbis, as
that marks EOS internally. After that, libvorbis will buffer all
input data, and encode none of it, eventually leading to memory
exhaustion.
parent d24780a0
2007-03-20 Michael Smith <msmith@fluendo.com>
* ext/vorbis/vorbisenc.c: (gst_vorbis_enc_chain):
If we get a zero-sized input buffer, don't pass it to libvorbis, as
that marks EOS internally. After that, libvorbis will buffer all
input data, and encode none of it, eventually leading to memory
exhaustion.
2007-03-19 Wim Taymans <wim@fluendo.com>
* gst/playback/gstdecodebin.c: (remove_fakesink):
......@@ -1149,6 +1149,12 @@ gst_vorbis_enc_chain (GstPad * pad, GstBuffer * buffer)
vorbisenc->next_discont = TRUE;
}
/* Sending zero samples to libvorbis marks EOS, so we mustn't do that */
if (GST_BUFFER_SIZE (buffer) == 0) {
gst_buffer_unref (buffer);
return GST_FLOW_OK;
}
/* data to encode */
data = (gfloat *) GST_BUFFER_DATA (buffer);
size = GST_BUFFER_SIZE (buffer) / (vorbisenc->channels * sizeof (float));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment