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
96abd70c
Commit
96abd70c
authored
Jul 11, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/dsdiff: move artist/title/id3 offsets out of DsdiffMetaData
They are only used inside dsdiff_read_metadata_extra().
parent
1f9d9c31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
22 deletions
+14
-22
DsdiffDecoderPlugin.cxx
src/decoder/plugins/DsdiffDecoderPlugin.cxx
+14
-22
No files found.
src/decoder/plugins/DsdiffDecoderPlugin.cxx
View file @
96abd70c
...
...
@@ -67,14 +67,6 @@ struct DsdiffMetaData {
unsigned
sample_rate
,
channels
;
bool
bitreverse
;
uint64_t
chunk_size
;
#ifdef HAVE_ID3TAG
InputStream
::
offset_type
id3_offset
;
uint64_t
id3_size
;
#endif
/** offset for artist tag */
InputStream
::
offset_type
diar_offset
;
/** offset for title tag */
InputStream
::
offset_type
diti_offset
;
};
static
bool
lsbitfirst
;
...
...
@@ -247,11 +239,13 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is,
if
(
!
dsdiff_read_chunk_header
(
decoder
,
is
,
chunk_header
))
return
false
;
metadata
->
diar_offset
=
0
;
metadata
->
diti_offset
=
0
;
/** offset for artist tag */
InputStream
::
offset_type
artist_offset
=
0
;
/** offset for title tag */
InputStream
::
offset_type
title_offset
=
0
;
#ifdef HAVE_ID3TAG
metadata
->
id3_offset
=
0
;
InputStream
::
offset_type
id3_offset
=
0
;
#endif
/* Now process all the remaining chunk headers in the stream
...
...
@@ -267,20 +261,19 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is,
/* DIAR chunk - DSDIFF native tag for Artist */
if
(
chunk_header
->
id
.
Equals
(
"DIAR"
))
{
chunk_size
=
chunk_header
->
GetSize
();
metadata
->
diar
_offset
=
is
.
GetOffset
();
artist
_offset
=
is
.
GetOffset
();
}
/* DITI chunk - DSDIFF native tag for Title */
if
(
chunk_header
->
id
.
Equals
(
"DITI"
))
{
chunk_size
=
chunk_header
->
GetSize
();
metadata
->
diti
_offset
=
is
.
GetOffset
();
title
_offset
=
is
.
GetOffset
();
}
#ifdef HAVE_ID3TAG
/* 'ID3 ' chunk, offspec. Used by sacdextract */
if
(
chunk_header
->
id
.
Equals
(
"ID3 "
))
{
chunk_size
=
chunk_header
->
GetSize
();
metadata
->
id3_offset
=
is
.
GetOffset
();
metadata
->
id3_size
=
chunk_size
;
id3_offset
=
is
.
GetOffset
();
}
#endif
...
...
@@ -291,22 +284,21 @@ dsdiff_read_metadata_extra(Decoder *decoder, InputStream &is,
/* done processing chunk headers, process tags if any */
#ifdef HAVE_ID3TAG
if
(
metadata
->
id3_offset
!=
0
)
{
if
(
id3_offset
!=
0
)
{
/* a ID3 tag has preference over the other tags, do not process
other tags if we have one */
dsdlib_tag_id3
(
is
,
handler
,
handler_ctx
,
metadata
->
id3_offset
);
dsdlib_tag_id3
(
is
,
handler
,
handler_ctx
,
id3_offset
);
return
true
;
}
#endif
if
(
metadata
->
diar
_offset
!=
0
)
if
(
artist
_offset
!=
0
)
dsdiff_handle_native_tag
(
is
,
handler
,
handler_ctx
,
metadata
->
diar
_offset
,
TAG_ARTIST
);
artist
_offset
,
TAG_ARTIST
);
if
(
metadata
->
diti
_offset
!=
0
)
if
(
title
_offset
!=
0
)
dsdiff_handle_native_tag
(
is
,
handler
,
handler_ctx
,
metadata
->
diti
_offset
,
TAG_TITLE
);
title
_offset
,
TAG_TITLE
);
return
true
;
}
...
...
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