qtdemux: Fix wrong compiler warning with gcc 6.2
authorchristophecvr <stefansat@telenet.be>
Sun, 20 Nov 2016 13:12:16 +0000 (14:12 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 21 Nov 2016 07:33:05 +0000 (09:33 +0200)
| ../../../git/gst/isomp4/qtdemux.c: In function 'qtdemux_parse_tree':
| ../../../git/gst/isomp4/qtdemux.c:10224:24: error: 'size' may be used uninitialized in this function [-Werror=maybe-uninitialized]
|                  offset += size;
|                         ^~
| ../../../git/gst/isomp4/qtdemux.c:10197:25: note: 'size' was declared here
|                  guint32 size, tag;
|                          ^~~~

https://bugzilla.gnome.org/show_bug.cgi?id=774747

gst/isomp4/qtdemux.c

index 15ac144..b76e103 100644 (file)
@@ -10194,7 +10194,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
                * to find one called field. Walk through them. */
               off_t offset = min_size;
               while (offset + 8 < len) {
-                guint32 size, tag;
+                guint32 size = 0, tag;
                 ok = gst_byte_reader_get_uint32_le (&br, &size);
                 ok &= gst_byte_reader_get_uint32_le (&br, &tag);
                 if (!ok || size < 8) {