summaryrefslogtreecommitdiff
path: root/lib/rbcodec/metadata
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/metadata')
-rw-r--r--lib/rbcodec/metadata/aac.c2
-rw-r--r--lib/rbcodec/metadata/asf.c6
-rw-r--r--lib/rbcodec/metadata/metadata_common.c2
-rw-r--r--lib/rbcodec/metadata/mp4.c8
4 files changed, 9 insertions, 9 deletions
diff --git a/lib/rbcodec/metadata/aac.c b/lib/rbcodec/metadata/aac.c
index 82adeacbde..358b2de079 100644
--- a/lib/rbcodec/metadata/aac.c
+++ b/lib/rbcodec/metadata/aac.c
@@ -41,7 +41,7 @@ static const int sample_rates[] =
41 41
42static bool check_adts_syncword(int fd) 42static bool check_adts_syncword(int fd)
43{ 43{
44 uint16_t syncword; 44 uint16_t syncword = 0;
45 45
46 read_uint16be(fd, &syncword); 46 read_uint16be(fd, &syncword);
47 return (syncword & 0xFFF6) == 0xFFF0; 47 return (syncword & 0xFFF6) == 0xFFF0;
diff --git a/lib/rbcodec/metadata/asf.c b/lib/rbcodec/metadata/asf.c
index b578746658..06f7470a69 100644
--- a/lib/rbcodec/metadata/asf.c
+++ b/lib/rbcodec/metadata/asf.c
@@ -129,9 +129,9 @@ static int asf_intdecode(int fd, int type, int length)
129{ 129{
130 int bytes = 0; 130 int bytes = 0;
131 int ret; 131 int ret;
132 uint16_t tmp16; 132 uint16_t tmp16 = 0;
133 uint32_t tmp32; 133 uint32_t tmp32 = 0;
134 uint64_t tmp64; 134 uint64_t tmp64 = 0;
135 135
136 if (type == 3) { 136 if (type == 3) {
137 bytes = read_uint32le(fd, &tmp32); 137 bytes = read_uint32le(fd, &tmp32);
diff --git a/lib/rbcodec/metadata/metadata_common.c b/lib/rbcodec/metadata/metadata_common.c
index 8eec16a877..e6f8aaf9a9 100644
--- a/lib/rbcodec/metadata/metadata_common.c
+++ b/lib/rbcodec/metadata/metadata_common.c
@@ -98,7 +98,7 @@ int read_uint32be(int fd, uint32_t* buf)
98int read_uint64be(int fd, uint64_t* buf) 98int read_uint64be(int fd, uint64_t* buf)
99{ 99{
100 size_t n; 100 size_t n;
101 uint8_t data[8]; 101 uint8_t data[8] = {0};
102 int i; 102 int i;
103 103
104 n = read(fd, data, 8); 104 n = read(fd, data, 8);
diff --git a/lib/rbcodec/metadata/mp4.c b/lib/rbcodec/metadata/mp4.c
index accc5cd662..19e6b515c7 100644
--- a/lib/rbcodec/metadata/mp4.c
+++ b/lib/rbcodec/metadata/mp4.c
@@ -195,7 +195,7 @@ static unsigned int read_mp4_length(int fd, uint32_t* size)
195{ 195{
196 unsigned int length = 0; 196 unsigned int length = 0;
197 int bytes = 0; 197 int bytes = 0;
198 unsigned char c; 198 unsigned char c = '\0';
199 199
200 do 200 do
201 { 201 {
@@ -211,7 +211,7 @@ static unsigned int read_mp4_length(int fd, uint32_t* size)
211 211
212static bool read_mp4_esds(int fd, struct mp3entry* id3, uint32_t* size) 212static bool read_mp4_esds(int fd, struct mp3entry* id3, uint32_t* size)
213{ 213{
214 unsigned char buf[8]; 214 unsigned char buf[8] = {0};
215 bool sbr = false; 215 bool sbr = false;
216 216
217 lseek(fd, 4, SEEK_CUR); /* Version and flags. */ 217 lseek(fd, 4, SEEK_CUR); /* Version and flags. */
@@ -789,8 +789,8 @@ static bool read_mp4_container(int fd, struct mp3entry* id3,
789 { 789 {
790 /* ADDME: add support for real chapters. Right now it's only 790 /* ADDME: add support for real chapters. Right now it's only
791 * used for Nero's gapless hack */ 791 * used for Nero's gapless hack */
792 uint8_t chapters; 792 uint8_t chapters = 0;
793 uint64_t timestamp; 793 uint64_t timestamp = 0;
794 794
795 lseek(fd, 8, SEEK_CUR); 795 lseek(fd, 8, SEEK_CUR);
796 read_uint8(fd, &chapters); 796 read_uint8(fd, &chapters);