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
349c6c97
Unverified
Commit
349c6c97
authored
Dec 29, 2023
by
Wolle
Committed by
GitHub
Dec 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corr. blockPicLen
parent
91deadbc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
src/vorbis_decoder/vorbis_decoder.cpp
src/vorbis_decoder/vorbis_decoder.cpp
+10
-5
No files found.
src/vorbis_decoder/vorbis_decoder.cpp
View file @
349c6c97
...
...
@@ -207,6 +207,9 @@ int VORBISDecode(uint8_t *inbuf, int *bytesLeft, short *outbuf){
ret
=
parseVorbisComment
(
inbuf
,
len
);
}
else
{
uint16_t
blockLen
=
len
;
// log_i("blockPicLen %i blockLen %i", s_blockPicLen, blockLen);
s_blockPicLen
-=
blockLen
;
;
// commentlength is greater than (one or more) OggS frame(s)
}
// log_w("s_vorbisSegmentTableSize %d", s_vorbisSegmentTableSize);
...
...
@@ -464,11 +467,13 @@ int parseVorbisComment(uint8_t *inbuf, int16_t nBytes){ // reference https:
if
(
idx
==
0
){
title
=
strndup
((
const
char
*
)(
s_vorbisChbuf
+
6
),
commentLength
-
6
);
s_commentLength
=
0
;}
idx
=
VORBIS_specialIndexOf
((
uint8_t
*
)
s_vorbisChbuf
,
"metadata_block_picture="
,
25
);
if
(
idx
==
0
){
s_blockPicLen
=
commentLength
;
if
(
idx
==
0
){
s_blockPicLen
=
commentLength
-
23
;
s_blockPicPos
+=
pos
+
23
;
uint16_t
blockPicLenUntilFrameEnd
=
s_commentHeaderLength
-
(
4
+
23
);
log_w
(
"metadata block picture found at pos %i, length %i, first blockLength %i"
,
s_blockPicPos
,
s_blockPicLen
,
blockPicLenUntilFrameEnd
);}
uint16_t
blockPicLenUntilFrameEnd
=
s_commentHeaderLength
-
4
-
23
;
log_i
(
"metadata block picture found at pos %i, length %i, first blockLength %i"
,
s_blockPicPos
,
s_blockPicLen
,
blockPicLenUntilFrameEnd
);
s_blockPicLen
-=
blockPicLenUntilFrameEnd
;
}
pos
+=
commentLength
+
4
;
s_commentHeaderLength
-=
(
4
+
commentLength
);
}
...
...
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