Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
54daa85a
Commit
54daa85a
authored
Aug 12, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/flac: support embedded pictures (FLAC__METADATA_TYPE_PICTURE)
parent
575ba519
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
FlacStreamMetadata.cxx
src/lib/xiph/FlacStreamMetadata.cxx
+19
-0
No files found.
src/lib/xiph/FlacStreamMetadata.cxx
View file @
54daa85a
...
...
@@ -149,6 +149,21 @@ Scan(const FLAC__StreamMetadata_StreamInfo &stream_info,
}
}
static
void
Scan
(
const
FLAC__StreamMetadata_Picture
&
picture
,
TagHandler
&
handler
)
noexcept
{
if
(
!
handler
.
WantPicture
())
return
;
if
(
picture
.
mime_type
!=
nullptr
&&
StringIsEqual
(
picture
.
mime_type
,
"-->"
))
/* this is a URL, not image data */
return
;
handler
.
OnPicture
(
picture
.
mime_type
,
{
picture
.
data
,
picture
.
data_length
});
}
void
flac_scan_metadata
(
const
FLAC__StreamMetadata
*
block
,
TagHandler
&
handler
)
noexcept
...
...
@@ -163,6 +178,10 @@ flac_scan_metadata(const FLAC__StreamMetadata *block,
Scan
(
block
->
data
.
stream_info
,
handler
);
break
;
case
FLAC__METADATA_TYPE_PICTURE
:
Scan
(
block
->
data
.
picture
,
handler
);
break
;
default
:
break
;
}
...
...
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