Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
5f1c7006
Commit
5f1c7006
authored
Mar 03, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* id3*: Search p_input (to make it working with demux2).
parent
41823c03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
10 deletions
+35
-10
modules/demux/util/id3.c
modules/demux/util/id3.c
+15
-5
modules/demux/util/id3tag.c
modules/demux/util/id3tag.c
+20
-5
No files found.
modules/demux/util/id3.c
View file @
5f1c7006
...
...
@@ -2,7 +2,7 @@
* id3.c: simple id3 tag skipper
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: id3.c,v 1.
7 2004/01/25 20:05:29 hartman
Exp $
* $Id: id3.c,v 1.
8 2004/03/03 11:38:14 fenrir
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -53,17 +53,24 @@ vlc_module_end();
****************************************************************************/
static
int
SkipID3Tag
(
vlc_object_t
*
p_this
)
{
input_thread_t
*
p_input
;
input_thread_t
*
p_input
=
NULL
;
uint8_t
*
p_peek
;
int
i_size
;
uint8_t
version
,
revision
;
int
b_footer
;
if
(
p_this
->
i_object_type
!
=
VLC_OBJECT_INPUT
)
if
(
p_this
->
i_object_type
=
=
VLC_OBJECT_INPUT
)
{
return
(
VLC_EGENERIC
);
p_input
=
(
input_thread_t
*
)
p_this
;
}
if
(
p_input
==
NULL
)
{
p_input
=
vlc_object_find
(
p_this
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
if
(
p_input
==
NULL
)
{
return
VLC_EGENERIC
;
}
}
p_input
=
(
input_thread_t
*
)
p_this
;
msg_Dbg
(
p_input
,
"checking for ID3 tag"
);
...
...
@@ -71,11 +78,13 @@ static int SkipID3Tag( vlc_object_t *p_this )
if
(
stream_Peek
(
p_input
->
s
,
&
p_peek
,
10
)
<
10
)
{
msg_Err
(
p_input
,
"cannot peek()"
);
vlc_object_release
(
p_input
);
return
VLC_EGENERIC
;
}
if
(
p_peek
[
0
]
!=
'I'
||
p_peek
[
1
]
!=
'D'
||
p_peek
[
2
]
!=
'3'
)
{
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
...
...
@@ -98,5 +107,6 @@ static int SkipID3Tag( vlc_object_t *p_this )
msg_Dbg
(
p_input
,
"ID3v2.%d revision %d tag found, skiping %d bytes"
,
version
,
revision
,
i_size
);
vlc_object_release
(
p_input
);
return
VLC_SUCCESS
;
}
modules/demux/util/id3tag.c
View file @
5f1c7006
...
...
@@ -2,7 +2,7 @@
* id3tag.c: id3 tag parser/skipper based on libid3tag
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
* $Id: id3tag.c,v 1.2
1 2004/02/14 01:53:17 gbazin
Exp $
* $Id: id3tag.c,v 1.2
2 2004/03/03 11:38:14 fenrir
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -191,16 +191,23 @@ static void ParseID3Tag( input_thread_t *p_input, uint8_t *p_data, int i_size )
****************************************************************************/
static
int
ParseID3Tags
(
vlc_object_t
*
p_this
)
{
input_thread_t
*
p_input
;
input_thread_t
*
p_input
=
NULL
;
uint8_t
*
p_peek
;
int
i_size
;
int
i_size2
;
if
(
p_this
->
i_object_type
!
=
VLC_OBJECT_INPUT
)
if
(
p_this
->
i_object_type
=
=
VLC_OBJECT_INPUT
)
{
return
(
VLC_EGENERIC
);
p_input
=
(
input_thread_t
*
)
p_this
;
}
if
(
p_input
==
NULL
)
{
p_input
=
vlc_object_find
(
p_this
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
if
(
p_input
==
NULL
)
{
return
VLC_EGENERIC
;
}
}
p_input
=
(
input_thread_t
*
)
p_this
;
msg_Dbg
(
p_input
,
"checking for ID3 tag"
);
...
...
@@ -221,6 +228,7 @@ static int ParseID3Tags( vlc_object_t *p_this )
if
(
stream_Peek
(
p_input
->
s
,
&
p_peek
,
10
)
<
10
)
{
msg_Err
(
p_input
,
"cannot peek()"
);
vlc_object_release
(
p_input
);
return
(
VLC_EGENERIC
);
}
...
...
@@ -231,6 +239,7 @@ static int ParseID3Tags( vlc_object_t *p_this )
if
(
stream_Peek
(
p_input
->
s
,
&
p_peek
,
i_size2
)
<
i_size2
)
{
msg_Err
(
p_input
,
"cannot peek()"
);
vlc_object_release
(
p_input
);
return
(
VLC_EGENERIC
);
}
msg_Dbg
(
p_input
,
"found ID3v1 tag"
);
...
...
@@ -242,6 +251,7 @@ static int ParseID3Tags( vlc_object_t *p_this )
if
(
stream_Peek
(
p_input
->
s
,
&
p_peek
,
128
)
<
128
)
{
msg_Err
(
p_input
,
"cannot peek()"
);
vlc_object_release
(
p_input
);
return
(
VLC_EGENERIC
);
}
i_size2
=
id3_tag_query
(
p_peek
+
118
,
10
);
...
...
@@ -253,6 +263,7 @@ static int ParseID3Tags( vlc_object_t *p_this )
if
(
stream_Peek
(
p_input
->
s
,
&
p_peek
,
i_size2
)
<
i_size2
)
{
msg_Err
(
p_input
,
"cannot peek()"
);
vlc_object_release
(
p_input
);
return
(
VLC_EGENERIC
);
}
msg_Dbg
(
p_input
,
"found ID3v2 tag at end of file"
);
...
...
@@ -266,12 +277,14 @@ static int ParseID3Tags( vlc_object_t *p_this )
if
(
stream_Peek
(
p_input
->
s
,
&
p_peek
,
10
)
<
10
)
{
msg_Err
(
p_input
,
"cannot peek()"
);
vlc_object_release
(
p_input
);
return
(
VLC_EGENERIC
);
}
i_size
=
id3_tag_query
(
p_peek
,
10
);
if
(
i_size
<=
0
)
{
vlc_object_release
(
p_input
);
return
(
VLC_SUCCESS
);
}
...
...
@@ -281,6 +294,7 @@ static int ParseID3Tags( vlc_object_t *p_this )
{
msg_Err
(
p_input
,
"cannot read ID3 tag"
);
if
(
p_peek
)
free
(
p_peek
);
vlc_object_release
(
p_input
);
return
(
VLC_EGENERIC
);
}
...
...
@@ -288,5 +302,6 @@ static int ParseID3Tags( vlc_object_t *p_this )
msg_Dbg
(
p_input
,
"found ID3v2 tag"
);
free
(
p_peek
);
vlc_object_release
(
p_input
);
return
(
VLC_SUCCESS
);
}
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