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
106127b6
Commit
106127b6
authored
Apr 05, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vorbis: permit to return attachments too
parent
fd94f73f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
modules/demux/flac.c
modules/demux/flac.c
+1
-1
modules/demux/ogg.c
modules/demux/ogg.c
+2
-1
modules/demux/vorbis.h
modules/demux/vorbis.h
+6
-1
No files found.
modules/demux/flac.c
View file @
106127b6
...
@@ -578,7 +578,7 @@ static void ParseComment( demux_t *p_demux, const uint8_t *p_data, int i_data )
...
@@ -578,7 +578,7 @@ static void ParseComment( demux_t *p_demux, const uint8_t *p_data, int i_data )
if
(
i_data
<
4
)
if
(
i_data
<
4
)
return
;
return
;
vorbis_ParseComment
(
&
p_sys
->
p_meta
,
&
p_data
[
4
],
i_data
-
4
);
vorbis_ParseComment
(
&
p_sys
->
p_meta
,
&
p_data
[
4
],
i_data
-
4
,
NULL
,
NULL
);
}
}
...
...
modules/demux/ogg.c
View file @
106127b6
...
@@ -1525,7 +1525,8 @@ static void Ogg_ExtractXiphMeta( demux_t *p_demux, const void *p_headers, unsign
...
@@ -1525,7 +1525,8 @@ static void Ogg_ExtractXiphMeta( demux_t *p_demux, const void *p_headers, unsign
/* TODO how to handle multiple comments properly ? */
/* TODO how to handle multiple comments properly ? */
if
(
i_count
>=
2
&&
pi_size
[
1
]
>
i_skip
)
if
(
i_count
>=
2
&&
pi_size
[
1
]
>
i_skip
)
vorbis_ParseComment
(
&
p_ogg
->
p_meta
,
(
uint8_t
*
)
pp_data
[
1
]
+
i_skip
,
pi_size
[
1
]
-
i_skip
);
vorbis_ParseComment
(
&
p_ogg
->
p_meta
,
(
uint8_t
*
)
pp_data
[
1
]
+
i_skip
,
pi_size
[
1
]
-
i_skip
,
&
p_ogg
->
i_attachments
,
&
p_ogg
->
attachments
);
for
(
unsigned
i
=
0
;
i
<
i_count
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
i_count
;
i
++
)
free
(
pp_data
[
i
]
);
free
(
pp_data
[
i
]
);
...
...
modules/demux/vorbis.h
View file @
106127b6
...
@@ -70,7 +70,8 @@ error:
...
@@ -70,7 +70,8 @@ error:
return
p_attachment
;
return
p_attachment
;
}
}
static
inline
void
vorbis_ParseComment
(
vlc_meta_t
**
pp_meta
,
const
uint8_t
*
p_data
,
int
i_data
)
static
inline
void
vorbis_ParseComment
(
vlc_meta_t
**
pp_meta
,
const
uint8_t
*
p_data
,
int
i_data
,
int
*
i_attachments
,
input_attachment_t
***
attachments
)
{
{
int
n
;
int
n
;
int
i_comment
;
int
i_comment
;
...
@@ -158,6 +159,9 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
...
@@ -158,6 +159,9 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
else
IF_EXTRACT
(
"DATE="
,
Date
)
else
IF_EXTRACT
(
"DATE="
,
Date
)
else
if
(
!
strncasecmp
(
psz
,
"METADATA_BLOCK_PICTURE="
,
strlen
(
"METADATA_BLOCK_PICTURE="
)))
else
if
(
!
strncasecmp
(
psz
,
"METADATA_BLOCK_PICTURE="
,
strlen
(
"METADATA_BLOCK_PICTURE="
)))
{
{
if
(
attachments
==
NULL
)
continue
;
int
i
;
int
i
;
uint8_t
*
p_picture
;
uint8_t
*
p_picture
;
size_t
i_size
=
vlc_b64_decode_binary
(
&
p_picture
,
&
psz
[
strlen
(
"METADATA_BLOCK_PICTURE="
)]);
size_t
i_size
=
vlc_b64_decode_binary
(
&
p_picture
,
&
psz
[
strlen
(
"METADATA_BLOCK_PICTURE="
)]);
...
@@ -168,6 +172,7 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
...
@@ -168,6 +172,7 @@ static inline void vorbis_ParseComment( vlc_meta_t **pp_meta, const uint8_t *p_d
snprintf
(
psz_url
,
sizeof
(
psz_url
),
"attachment://%s"
,
p_attachment
->
psz_name
);
snprintf
(
psz_url
,
sizeof
(
psz_url
),
"attachment://%s"
,
p_attachment
->
psz_name
);
vlc_meta_Set
(
p_meta
,
vlc_meta_ArtworkURL
,
psz_url
);
vlc_meta_Set
(
p_meta
,
vlc_meta_ArtworkURL
,
psz_url
);
i_attach
++
;
i_attach
++
;
TAB_APPEND
(
*
i_attachments
,
*
attachments
,
p_attachment
);
}
}
}
}
else
if
(
strchr
(
psz
,
'='
)
)
else
if
(
strchr
(
psz
,
'='
)
)
...
...
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