summaryrefslogtreecommitdiffstats
path: root/ext/speex/gstspeexenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/speex/gstspeexenc.c')
-rw-r--r--ext/speex/gstspeexenc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c
index 429c7c7a..f6d97467 100644
--- a/ext/speex/gstspeexenc.c
+++ b/ext/speex/gstspeexenc.c
@@ -841,11 +841,13 @@ static GstCaps *
gst_speexenc_set_header_on_caps (GstCaps * caps, GstBuffer * buf1,
GstBuffer * buf2)
{
- caps = gst_caps_make_writable (caps);
- GstStructure *structure = gst_caps_get_structure (caps, 0);
+ GstStructure *structure = NULL;
GValue array = { 0 };
GValue value = { 0 };
+ caps = gst_caps_make_writable (caps);
+ structure = gst_caps_get_structure (caps, 0);
+
/* mark buffers */
GST_BUFFER_FLAG_SET (buf1, GST_BUFFER_FLAG_IN_CAPS);
GST_BUFFER_FLAG_SET (buf2, GST_BUFFER_FLAG_IN_CAPS);