From cf5cd85a3b5e1dd509863afd4347ad2683da1a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 11 Nov 2014 11:18:19 +0100 Subject: [PATCH] interaudiosrc: Make sure we have a writable buffer before we start changing metadata --- gst/inter/gstinteraudiosrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/inter/gstinteraudiosrc.c b/gst/inter/gstinteraudiosrc.c index 417c0973a9..285007902d 100644 --- a/gst/inter/gstinteraudiosrc.c +++ b/gst/inter/gstinteraudiosrc.c @@ -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; if (n < period_samples) { GstMapInfo map; @@ -401,7 +403,6 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size, map.size); gst_memory_unmap (mem, &map); } - buffer = gst_buffer_make_writable (buffer); gst_buffer_prepend_memory (buffer, mem); } n = period_samples;