Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
ffd94f38
Commit
ffd94f38
authored
Aug 23, 2009
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Id3tag: fix compilation after breakage
[
62bd7af8
] and [
182692ca
]
parent
d6f1aefe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
modules/meta_engine/id3tag.c
modules/meta_engine/id3tag.c
+15
-14
No files found.
modules/meta_engine/id3tag.c
View file @
ffd94f38
...
@@ -62,11 +62,10 @@ vlc_module_end ()
...
@@ -62,11 +62,10 @@ vlc_module_end ()
/*****************************************************************************
/*****************************************************************************
* ParseID3Tag : parse an id3tag into the info structures
* ParseID3Tag : parse an id3tag into the info structures
*****************************************************************************/
*****************************************************************************/
static
void
ParseID3Tag
(
demux_
t
*
p_demux
,
const
uint8_t
*
p_data
,
int
i_size
)
static
void
ParseID3Tag
(
demux_
meta_t
*
p_demux_meta
,
const
uint8_t
*
p_data
,
int
i_size
)
{
{
struct
id3_tag
*
p_id3_tag
;
struct
id3_tag
*
p_id3_tag
;
struct
id3_frame
*
p_frame
;
struct
id3_frame
*
p_frame
;
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
vlc_meta_t
*
p_meta
;
vlc_meta_t
*
p_meta
;
int
i
;
int
i
;
...
@@ -225,7 +224,7 @@ static void ParseID3Tag( demux_t *p_demux, const uint8_t *p_data, int i_size )
...
@@ -225,7 +224,7 @@ static void ParseID3Tag( demux_t *p_demux, const uint8_t *p_data, int i_size )
}
}
else
if
(
ID_IS
(
"APIC"
)
)
else
if
(
ID_IS
(
"APIC"
)
)
{
{
msg_Dbg
(
p_demux
,
"** Has APIC **"
);
msg_Dbg
(
p_demux
_meta
,
"** Has APIC **"
);
}
}
else
if
(
p_frame
->
description
)
else
if
(
p_frame
->
description
)
{
{
...
@@ -265,9 +264,8 @@ static size_t GetAPEvXSize( const uint8_t *p_data, int i_data )
...
@@ -265,9 +264,8 @@ static size_t GetAPEvXSize( const uint8_t *p_data, int i_data )
/* it is the footer */
/* it is the footer */
return
i_body
+
(
(
flags
&
(
1
<<
31
))
?
APE_TAG_HEADERSIZE
:
0
);
return
i_body
+
(
(
flags
&
(
1
<<
31
))
?
APE_TAG_HEADERSIZE
:
0
);
}
}
static
void
ParseAPEvXTag
(
demux_
t
*
p_demux
,
const
uint8_t
*
p_data
,
int
i_data
)
static
void
ParseAPEvXTag
(
demux_
meta_t
*
p_demux_meta
,
const
uint8_t
*
p_data
,
int
i_data
)
{
{
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
vlc_meta_t
*
p_meta
;
vlc_meta_t
*
p_meta
;
bool
b_start
;
bool
b_start
;
bool
b_end
;
bool
b_end
;
...
@@ -371,8 +369,9 @@ static void ParseAPEvXTag( demux_t *p_demux, const uint8_t *p_data, int i_data )
...
@@ -371,8 +369,9 @@ static void ParseAPEvXTag( demux_t *p_demux, const uint8_t *p_data, int i_data )
* CheckFooter: check for ID3/APE at the end of the file
* CheckFooter: check for ID3/APE at the end of the file
* CheckHeader: check for ID3/APE at the begining of the file
* CheckHeader: check for ID3/APE at the begining of the file
*****************************************************************************/
*****************************************************************************/
static
void
CheckFooter
(
demux_
t
*
p_demux
)
static
void
CheckFooter
(
demux_
meta_t
*
p_demux_meta
)
{
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_demux_meta
->
p_demux
;
const
int64_t
i_pos
=
stream_Size
(
p_demux
->
s
);
const
int64_t
i_pos
=
stream_Size
(
p_demux
->
s
);
const
size_t
i_peek
=
128
+
APE_TAG_HEADERSIZE
;
const
size_t
i_peek
=
128
+
APE_TAG_HEADERSIZE
;
const
uint8_t
*
p_peek
;
const
uint8_t
*
p_peek
;
...
@@ -397,7 +396,7 @@ static void CheckFooter( demux_t *p_demux )
...
@@ -397,7 +396,7 @@ static void CheckFooter( demux_t *p_demux )
if
(
i_id3v1_size
==
128
)
if
(
i_id3v1_size
==
128
)
{
{
msg_Dbg
(
p_demux
,
"found ID3v1 tag"
);
msg_Dbg
(
p_demux
,
"found ID3v1 tag"
);
ParseID3Tag
(
p_demux
,
p_peek_id3
,
i_id3v1_size
);
ParseID3Tag
(
p_demux
_meta
,
p_peek_id3
,
i_id3v1_size
);
}
}
/* Compute ID3v2 position */
/* Compute ID3v2 position */
...
@@ -433,7 +432,7 @@ static void CheckFooter( demux_t *p_demux )
...
@@ -433,7 +432,7 @@ static void CheckFooter( demux_t *p_demux )
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_id3v2_size
)
==
i_id3v2_size
)
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_id3v2_size
)
==
i_id3v2_size
)
{
{
msg_Dbg
(
p_demux
,
"found ID3v2 tag at end of file"
);
msg_Dbg
(
p_demux
,
"found ID3v2 tag at end of file"
);
ParseID3Tag
(
p_demux
,
p_peek
,
i_id3v2_size
);
ParseID3Tag
(
p_demux
_meta
,
p_peek
,
i_id3v2_size
);
}
}
}
}
...
@@ -444,15 +443,17 @@ static void CheckFooter( demux_t *p_demux )
...
@@ -444,15 +443,17 @@ static void CheckFooter( demux_t *p_demux )
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_apevx_size
)
==
i_apevx_size
)
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_apevx_size
)
==
i_apevx_size
)
{
{
msg_Dbg
(
p_demux
,
"found APEvx tag at end of file"
);
msg_Dbg
(
p_demux
,
"found APEvx tag at end of file"
);
ParseAPEvXTag
(
p_demux
,
p_peek
,
i_apevx_size
);
ParseAPEvXTag
(
p_demux
_meta
,
p_peek
,
i_apevx_size
);
}
}
}
}
}
}
static
void
CheckHeader
(
demux_
t
*
p_demux
)
static
void
CheckHeader
(
demux_
meta_t
*
p_demux_meta
)
{
{
const
uint8_t
*
p_peek
;
const
uint8_t
*
p_peek
;
int
i_size
;
int
i_size
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_demux_meta
->
p_demux
;
if
(
stream_Seek
(
p_demux
->
s
,
0
)
)
if
(
stream_Seek
(
p_demux
->
s
,
0
)
)
return
;
return
;
...
@@ -464,7 +465,7 @@ static void CheckHeader( demux_t *p_demux )
...
@@ -464,7 +465,7 @@ static void CheckHeader( demux_t *p_demux )
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_size
)
==
i_size
)
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_size
)
==
i_size
)
{
{
msg_Dbg
(
p_demux
,
"found ID3v2 tag"
);
msg_Dbg
(
p_demux
,
"found ID3v2 tag"
);
ParseID3Tag
(
p_demux
,
p_peek
,
i_size
);
ParseID3Tag
(
p_demux
_meta
,
p_peek
,
i_size
);
return
;
return
;
}
}
...
@@ -476,7 +477,7 @@ static void CheckHeader( demux_t *p_demux )
...
@@ -476,7 +477,7 @@ static void CheckHeader( demux_t *p_demux )
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_size
)
==
i_size
)
stream_Peek
(
p_demux
->
s
,
&
p_peek
,
i_size
)
==
i_size
)
{
{
msg_Dbg
(
p_demux
,
"found APEv1/2 tag"
);
msg_Dbg
(
p_demux
,
"found APEv1/2 tag"
);
ParseAPEvXTag
(
p_demux
,
p_peek
,
i_size
);
ParseAPEvXTag
(
p_demux
_meta
,
p_peek
,
i_size
);
}
}
}
}
...
@@ -501,10 +502,10 @@ static int ParseTags( vlc_object_t *p_this )
...
@@ -501,10 +502,10 @@ static int ParseTags( vlc_object_t *p_this )
p_demux_meta
->
p_meta
=
NULL
;
p_demux_meta
->
p_meta
=
NULL
;
/* */
/* */
CheckFooter
(
p_demux
);
CheckFooter
(
p_demux
_meta
);
/* */
/* */
CheckHeader
(
p_demux
);
CheckHeader
(
p_demux
_meta
);
/* Restore position
/* Restore position
* Demuxer will not see tags at the start as src/input/demux.c skips it
* Demuxer will not see tags at the start as src/input/demux.c skips it
...
...
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