mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
5bfc7b4bfe
commit
47182ca61f
1 changed files with 4 additions and 2 deletions
|
@ -2757,9 +2757,9 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
|
||||||
*buf = newbuf;
|
*buf = newbuf;
|
||||||
audiocontext->wvpk_block_index += block_samples;
|
audiocontext->wvpk_block_index += block_samples;
|
||||||
} else {
|
} else {
|
||||||
guint8 *outdata;
|
guint8 *outdata = NULL;
|
||||||
guint outpos = 0;
|
guint outpos = 0;
|
||||||
gsize buf_size, size, out_size;
|
gsize buf_size, size, out_size = 0;
|
||||||
guint32 block_samples, flags, crc, blocksize;
|
guint32 block_samples, flags, crc, blocksize;
|
||||||
|
|
||||||
buf_data = gst_buffer_map (*buf, &buf_size, NULL, GST_MAP_READ);
|
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)
|
if (blocksize == 0 || size < blocksize)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
g_assert ((newbuf == NULL) == (outdata == NULL));
|
||||||
|
|
||||||
if (newbuf == NULL) {
|
if (newbuf == NULL) {
|
||||||
out_size = sizeof (Wavpack4Header) + blocksize;
|
out_size = sizeof (Wavpack4Header) + blocksize;
|
||||||
newbuf = gst_buffer_new_allocate (NULL, out_size, 0);
|
newbuf = gst_buffer_new_allocate (NULL, out_size, 0);
|
||||||
|
|
Loading…
Reference in a new issue