interaudiosrc: Make sure we have a writable buffer before we start changing metadata

This commit is contained in:
Sebastian Dröge 2014-11-11 11:18:19 +01:00
parent ce6222f8d4
commit cf5cd85a3b

View file

@ -387,6 +387,8 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
} }
} }
buffer = gst_buffer_make_writable (buffer);
bpf = interaudiosrc->info.bpf; bpf = interaudiosrc->info.bpf;
if (n < period_samples) { if (n < period_samples) {
GstMapInfo map; GstMapInfo map;
@ -401,7 +403,6 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
map.size); map.size);
gst_memory_unmap (mem, &map); gst_memory_unmap (mem, &map);
} }
buffer = gst_buffer_make_writable (buffer);
gst_buffer_prepend_memory (buffer, mem); gst_buffer_prepend_memory (buffer, mem);
} }
n = period_samples; n = period_samples;