Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ESP32-audioI2S
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ESP32-audioI2S
Commits
f5b25a86
Unverified
Commit
f5b25a86
authored
Feb 05, 2022
by
Wolle
Committed by
GitHub
Feb 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
guard impl. for invalid audioheader
parent
6dc1f001
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/Audio.cpp
src/Audio.cpp
+6
-2
src/Audio.h
src/Audio.h
+1
-0
No files found.
src/Audio.cpp
View file @
f5b25a86
...
...
@@ -2,7 +2,7 @@
* Audio.cpp
*
* Created on: Oct 26,2018
* Updated on: Feb 0
4
,2022
* Updated on: Feb 0
5
,2022
* Author: Wolle (schreibfaul1)
*
*/
...
...
@@ -1830,7 +1830,7 @@ int Audio::read_M4A_Header(uint8_t *data, size_t len) {
if
(
m_controlCounter
==
M4A_AMRDY
){
// almost ready
m_audioDataStart
=
headerSize
;
m_contentlength
=
headerSize
+
m_audioDataSize
;
// after this mdat atom there may be other atoms
log_i
(
"begin mdat %i"
,
headerSize
);
//
log_i("begin mdat %i", headerSize);
if
(
m_f_localfile
){
AUDIO_INFO
(
sprintf
(
chbuf
,
"Content-Length: %u"
,
m_contentlength
);)
}
...
...
@@ -2849,6 +2849,10 @@ void Audio::processLocalFile() {
m_controlCounter
=
100
;
}
}
if
(
!
isRunning
()){
log_e
(
"Processing stopped due to invalid audio header"
);
return
;
}
}
else
{
bytesDecoded
=
sendBytes
(
InBuff
.
getReadPtr
(),
bytesCanBeRead
);
...
...
src/Audio.h
View file @
f5b25a86
...
...
@@ -8,6 +8,7 @@
//#define SDFATFS_USED // activate for SdFat
#pragma once
#pragma GCC optimize ("Ofast")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment