Replaces the memory block at index @idx in @buffer with @mem.
an index
a #GstMemory
See Implementation
Replaces the memory block at index @idx in @buffer with @mem.