From 47182ca61fa53cb090629b0c86877414522ed2ea Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Thu, 1 Dec 2011 15:29:15 +0000 Subject: [PATCH] matroskademux: placate gcc since -Werror is used Initialize values that GCC cannot prove are not used without being initialized, and assert that I did not mess up my proof. --- gst/matroska/matroska-demux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index d8c16a3483..414c02fec3 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -2757,9 +2757,9 @@ gst_matroska_demux_add_wvpk_header (GstElement * element, *buf = newbuf; audiocontext->wvpk_block_index += block_samples; } else { - guint8 *outdata; + guint8 *outdata = NULL; guint outpos = 0; - gsize buf_size, size, out_size; + gsize buf_size, size, out_size = 0; guint32 block_samples, flags, crc, blocksize; buf_data = gst_buffer_map (*buf, &buf_size, NULL, GST_MAP_READ); @@ -2791,6 +2791,8 @@ gst_matroska_demux_add_wvpk_header (GstElement * element, if (blocksize == 0 || size < blocksize) break; + g_assert ((newbuf == NULL) == (outdata == NULL)); + if (newbuf == NULL) { out_size = sizeof (Wavpack4Header) + blocksize; newbuf = gst_buffer_new_allocate (NULL, out_size, 0);