From b4e6fcd0519893e8f1a3bfa464b4472a606dfcd8 Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Fri, 21 May 2010 13:25:24 +0100 Subject: [PATCH] matroskamux: make sure pads caps are set before any buffers pushed. --- gst/matroska/matroska-mux.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 1a15ee5cb0..2fc52d9a57 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -2007,6 +2007,17 @@ gst_matroska_mux_start (GstMatroskaMux * mux) GTimeVal time = { 0, 0 }; GstBuffer *streamheader_buffer; + /* set initial pad caps */ + { + GstCaps *caps; + if (!strcmp (mux->doctype, GST_MATROSKA_DOCTYPE_WEBM)) { + caps = gst_caps_from_string ("video/webm"); + } else { + caps = gst_caps_from_string ("video/x-matroska"); + } + gst_pad_set_caps (mux->srcpad, caps); + gst_caps_unref (caps); + } /* we start with a EBML header */ doctype = mux->doctype; GST_INFO_OBJECT (ebml, "DocType: %s, Version: %d",