Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e1066b6e
Commit
e1066b6e
authored
Oct 10, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
id3tag: fixed segfault (introduced with demux_meta_t)
parent
5c1bbbef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
modules/meta_engine/id3tag.c
modules/meta_engine/id3tag.c
+20
-13
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+1
-1
No files found.
modules/meta_engine/id3tag.c
View file @
e1066b6e
...
@@ -65,14 +65,13 @@ static void ParseID3Tag( demux_t *p_demux, uint8_t *p_data, int i_size )
...
@@ -65,14 +65,13 @@ static void ParseID3Tag( demux_t *p_demux, uint8_t *p_data, int i_size )
vlc_meta_t
*
p_meta
;
vlc_meta_t
*
p_meta
;
int
i
;
int
i
;
TAB_INIT
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
p_demux_meta
->
p_meta
=
NULL
;
p_id3_tag
=
id3_tag_parse
(
p_data
,
i_size
);
p_id3_tag
=
id3_tag_parse
(
p_data
,
i_size
);
if
(
!
p_id3_tag
)
if
(
!
p_id3_tag
)
return
;
return
;
p_demux_meta
->
p_meta
=
p_meta
=
vlc_meta_New
();
if
(
!
p_demux_meta
->
p_meta
)
p_demux_meta
->
p_meta
=
vlc_meta_New
();
p_meta
=
p_demux_meta
->
p_meta
;
#define ID_IS( a ) (!strcmp( p_frame->id, a ))
#define ID_IS( a ) (!strcmp( p_frame->id, a ))
#define DESCR_IS( a) strstr( (char*)p_frame->description, a )
#define DESCR_IS( a) strstr( (char*)p_frame->description, a )
...
@@ -265,7 +264,8 @@ static int GetAPEvXSize( const uint8_t *p_data, int i_data )
...
@@ -265,7 +264,8 @@ static int GetAPEvXSize( const uint8_t *p_data, int i_data )
}
}
static
void
ParseAPEvXTag
(
demux_t
*
p_demux
,
uint8_t
*
p_data
,
int
i_data
)
static
void
ParseAPEvXTag
(
demux_t
*
p_demux
,
uint8_t
*
p_data
,
int
i_data
)
{
{
vlc_meta_t
*
p_meta
=
(
vlc_meta_t
*
)
p_demux
->
p_private
;
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
vlc_meta_t
*
p_meta
;
vlc_bool_t
b_start
;
vlc_bool_t
b_start
;
vlc_bool_t
b_end
;
vlc_bool_t
b_end
;
uint8_t
*
p_header
=
NULL
;
uint8_t
*
p_header
=
NULL
;
...
@@ -279,6 +279,10 @@ static void ParseAPEvXTag( demux_t *p_demux, uint8_t *p_data, int i_data )
...
@@ -279,6 +279,10 @@ static void ParseAPEvXTag( demux_t *p_demux, uint8_t *p_data, int i_data )
if
(
!
b_end
&&
!
b_start
)
if
(
!
b_end
&&
!
b_start
)
return
;
return
;
if
(
!
p_demux_meta
->
p_meta
)
p_demux_meta
->
p_meta
=
vlc_meta_New
();
p_meta
=
p_demux_meta
->
p_meta
;
if
(
b_start
)
if
(
b_start
)
{
{
p_header
=
&
p_data
[
0
];
p_header
=
&
p_data
[
0
];
...
@@ -297,9 +301,6 @@ static void ParseAPEvXTag( demux_t *p_demux, uint8_t *p_data, int i_data )
...
@@ -297,9 +301,6 @@ static void ParseAPEvXTag( demux_t *p_demux, uint8_t *p_data, int i_data )
if
(
i_entry
<=
0
)
if
(
i_entry
<=
0
)
return
;
return
;
if
(
!
p_meta
)
p_demux
->
p_private
=
p_meta
=
vlc_meta_New
();
while
(
i_entry
>
0
&&
i_data
>=
10
)
while
(
i_entry
>
0
&&
i_data
>=
10
)
{
{
const
int
i_size
=
GetDWLE
(
&
p_data
[
0
]
);
const
int
i_size
=
GetDWLE
(
&
p_data
[
0
]
);
...
@@ -482,17 +483,20 @@ static void CheckHeader( demux_t *p_demux )
...
@@ -482,17 +483,20 @@ static void CheckHeader( demux_t *p_demux )
static
int
ParseTags
(
vlc_object_t
*
p_this
)
static
int
ParseTags
(
vlc_object_t
*
p_this
)
{
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
vlc_bool_t
b_seekable
;
vlc_bool_t
b_seekable
;
int64_t
i_init
;
int64_t
i_init
;
msg_Dbg
(
p_demux
,
"checking for ID3v1/2 and APEv1/2 tags"
);
msg_Dbg
(
p_demux
,
"checking for ID3v1/2 and APEv1/2 tags"
);
stream_Control
(
p_demux
->
s
,
STREAM_CAN_FASTSEEK
,
&
b_seekable
);
stream_Control
(
p_demux
->
s
,
STREAM_CAN_FASTSEEK
,
&
b_seekable
);
if
(
!
b_seekable
)
if
(
!
b_seekable
)
return
VLC_
SUCCESS
;
return
VLC_
EGENERIC
;
i_init
=
stream_Tell
(
p_demux
->
s
);
i_init
=
stream_Tell
(
p_demux
->
s
);
TAB_INIT
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
p_demux_meta
->
p_meta
=
NULL
;
/* */
/* */
CheckFooter
(
p_demux
);
CheckFooter
(
p_demux
);
...
@@ -504,5 +508,8 @@ static int ParseTags( vlc_object_t *p_this )
...
@@ -504,5 +508,8 @@ static int ParseTags( vlc_object_t *p_this )
* for them
* for them
*/
*/
stream_Seek
(
p_demux
->
s
,
i_init
);
stream_Seek
(
p_demux
->
s
,
i_init
);
if
(
!
p_demux_meta
->
p_meta
&&
p_demux_meta
->
i_attachments
<=
0
)
return
VLC_EGENERIC
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
modules/meta_engine/taglib.cpp
View file @
e1066b6e
...
@@ -231,7 +231,7 @@ static int ReadMeta( vlc_object_t *p_this )
...
@@ -231,7 +231,7 @@ static int ReadMeta( vlc_object_t *p_this )
{
{
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_t
*
p_demux
=
(
demux_t
*
)
p_this
;
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
demux_meta_t
*
p_demux_meta
=
(
demux_meta_t
*
)
p_demux
->
p_private
;
vlc_meta_t
*
p_meta
=
p_demux_meta
->
p_meta
;
vlc_meta_t
*
p_meta
;
TAB_INIT
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
TAB_INIT
(
p_demux_meta
->
i_attachments
,
p_demux_meta
->
attachments
);
p_demux_meta
->
p_meta
=
NULL
;
p_demux_meta
->
p_meta
=
NULL
;
...
...
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