From b9048fd953668b5fa6c76b6d7c015bf49e561c2d Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 19 Nov 2010 12:45:00 +0100 Subject: [PATCH] matroskademux: minor cleanups in setting streamheader on caps --- gst/matroska/matroska-mux.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index f456ff6a32..00398519cc 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -2500,21 +2500,22 @@ gst_matroska_mux_stop_streamheader (GstMatroskaMux * mux) streamheader_buffer = gst_ebml_stop_streamheader (ebml); if (!strcmp (mux->doctype, GST_MATROSKA_DOCTYPE_WEBM)) { - caps = gst_caps_from_string ("video/webm"); + caps = gst_caps_new_simple ("video/webm", NULL); } else { - caps = gst_caps_from_string ("video/x-matroska"); + caps = gst_caps_new_simple ("video/x-matroska", NULL); } s = gst_caps_get_structure (caps, 0); g_value_init (&streamheader, GST_TYPE_ARRAY); g_value_init (&bufval, GST_TYPE_BUFFER); + GST_BUFFER_FLAG_SET (streamheader_buffer, GST_BUFFER_FLAG_IN_CAPS); gst_value_set_buffer (&bufval, streamheader_buffer); gst_value_array_append_value (&streamheader, &bufval); g_value_unset (&bufval); gst_structure_set_value (s, "streamheader", &streamheader); g_value_unset (&streamheader); - gst_caps_unref (ebml->caps); + gst_caps_replace (&ebml->caps, caps); gst_buffer_unref (streamheader_buffer); - ebml->caps = caps; + gst_caps_unref (caps); } /**