diff --git a/ChangeLog b/ChangeLog index 991f4012bc..74a4eef6c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-03-02 Michael Smith + + * ext/amrnb/amrnbenc.c: (gst_amrnbenc_chain): + The AMR encoder writes into the audio buffers it processes, so + use gst_buffer_make_writable() on buffers we might (they go through + an adapter, so there can be copying going on later anyway) be + encoding. + 2006-03-01 Tim-Philipp Müller * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_pad_added), diff --git a/ext/amrnb/amrnbenc.c b/ext/amrnb/amrnbenc.c index d82a66c1f2..ad7d14fda3 100644 --- a/ext/amrnb/amrnbenc.c +++ b/ext/amrnb/amrnbenc.c @@ -200,6 +200,9 @@ gst_amrnbenc_chain (GstPad * pad, GstBuffer * buffer) if (GST_BUFFER_TIMESTAMP_IS_VALID (buffer)) amrnbenc->ts = GST_BUFFER_TIMESTAMP (buffer); + /* The AMR encoder actually writes into the source data buffers it gets */ + buffer = gst_buffer_make_writable (buffer); + ret = GST_FLOW_OK; gst_adapter_push (amrnbenc->adapter, buffer);