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.
This commit is contained in:
Vincent Penquerc'h 2011-12-01 15:29:15 +00:00
parent 5bfc7b4bfe
commit 47182ca61f

View file

@ -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);