+2005-02-21 Jan Schmidt <thaytan@mad.scientist.com>
+ * gst/dvdlpcmdec/gstdvdlpcmdec.c: (gst_dvdlpcmdec_chain):
+ Make sure we only write to writable buffers
+
2005-02-20 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/riff/riff-media.c:
{
GstBuffer *buf = GST_BUFFER (_data);
GstDvdLpcmDec *dvdlpcmdec;
- guchar *data;
gint64 size;
g_return_if_fail (pad != NULL);
dvdlpcmdec = GST_DVDLPCMDEC (gst_pad_get_parent (pad));
- data = GST_BUFFER_DATA (buf);
size = GST_BUFFER_SIZE (buf);
GST_LOG_OBJECT (dvdlpcmdec, "got buffer %p of size %" G_GINT64_FORMAT, buf,
}
gst_buffer_stamp (outbuf, buf);
- src = data;
+ src = GST_BUFFER_DATA (buf);;
dest = GST_BUFFER_DATA (outbuf);
/* Copy 20-bit LPCM format to 24-bit buffers, with 0x00 in the lowest
* and last byte are already correct */
gint64 count = size / 12;
gint64 i;
- guchar *src = data;
+ guchar *src;
+
+ /* Ensure our output buffer is writable */
+ buf = gst_buffer_copy_on_write (buf);
+ src = GST_BUFFER_DATA (buf);
for (i = 0; i < count; i++) {
guchar temp[9];