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
254127b7
Commit
254127b7
authored
Dec 22, 2003
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* stream_Size reports the size of a stream, not stream_Tell
This fixes the ID3 detection of ID3v1.
parent
80e1dc74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
modules/demux/util/id3tag.c
modules/demux/util/id3tag.c
+11
-7
No files found.
modules/demux/util/id3tag.c
View file @
254127b7
...
...
@@ -2,7 +2,7 @@
* id3tag.c: id3 tag parser/skipper based on libid3tag
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: id3tag.c,v 1.1
6 2003/11/25 00:56:34 fenrir
Exp $
* $Id: id3tag.c,v 1.1
7 2003/12/22 22:37:01 hartman
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -188,8 +188,9 @@ static int ParseID3Tags( vlc_object_t *p_this )
{
int64_t
i_pos
;
/*look for a id3v1 tag at the end of the file*/
i_pos
=
stream_Tell
(
p_input
->
s
);
/*look for a ID3v1 tag at the end of the file*/
i_pos
=
stream_Size
(
p_input
->
s
);
if
(
i_pos
>
128
)
{
input_AccessReinit
(
p_input
);
...
...
@@ -201,6 +202,7 @@ static int ParseID3Tags( vlc_object_t *p_this )
msg_Err
(
p_input
,
"cannot peek()"
);
return
(
VLC_EGENERIC
);
}
i_size2
=
id3_tag_query
(
p_peek
,
10
);
if
(
i_size2
==
128
)
{
...
...
@@ -210,11 +212,12 @@ static int ParseID3Tags( vlc_object_t *p_this )
msg_Err
(
p_input
,
"cannot peek()"
);
return
(
VLC_EGENERIC
);
}
msg_Dbg
(
p_input
,
"Found ID3v1 tag"
);
ParseID3Tag
(
p_input
,
p_peek
,
i_size2
);
}
/* look for
id
3v2.4 tag at end of file */
/* get 10 byte
id
3 footer */
/* look for
ID
3v2.4 tag at end of file */
/* get 10 byte
ID
3 footer */
if
(
stream_Peek
(
p_input
->
s
,
&
p_peek
,
128
)
<
128
)
{
msg_Err
(
p_input
,
"cannot peek()"
);
...
...
@@ -231,6 +234,7 @@ static int ParseID3Tags( vlc_object_t *p_this )
msg_Err
(
p_input
,
"cannot peek()"
);
return
(
VLC_EGENERIC
);
}
msg_Dbg
(
p_input
,
"Found ID3v2 tag at end of file"
);
ParseID3Tag
(
p_input
,
p_peek
,
i_size2
);
}
}
...
...
@@ -254,13 +258,13 @@ static int ParseID3Tags( vlc_object_t *p_this )
p_peek
=
malloc
(
i_size
);
if
(
!
p_peek
||
stream_Read
(
p_input
->
s
,
p_peek
,
i_size
)
<
i_size
)
{
msg_Err
(
p_input
,
"
cannot read id
3 tag"
);
msg_Err
(
p_input
,
"
Cannot read ID
3 tag"
);
if
(
p_peek
)
free
(
p_peek
);
return
(
VLC_EGENERIC
);
}
ParseID3Tag
(
p_input
,
p_peek
,
i_size
);
msg_Dbg
(
p_input
,
"
ID3 tag found, skiping %d bytes"
,
i_size
);
msg_Dbg
(
p_input
,
"
Found ID3v2 tag"
);
free
(
p_peek
);
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