Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
c4a37885
Commit
c4a37885
authored
Oct 10, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
id3v2: reduce the scope of some non-globally-used symbols/structures
parent
3b78c180
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
18 deletions
+14
-18
id3v2.c
libavformat/id3v2.c
+14
-8
id3v2.h
libavformat/id3v2.h
+0
-10
No files found.
libavformat/id3v2.c
View file @
c4a37885
...
...
@@ -54,7 +54,7 @@ const AVMetadataConv ff_id3v2_4_metadata_conv[] = {
{
0
}
};
const
AVMetadataConv
ff_
id3v2_2_metadata_conv
[]
=
{
static
const
AVMetadataConv
id3v2_2_metadata_conv
[]
=
{
{
"TAL"
,
"album"
},
{
"TCO"
,
"genre"
},
{
"TT2"
,
"title"
},
...
...
@@ -380,7 +380,14 @@ finish:
av_dict_set
(
m
,
"date"
,
date
,
0
);
}
const
ID3v2EMFunc
ff_id3v2_extra_meta_funcs
[]
=
{
typedef
struct
ID3v2EMFunc
{
const
char
*
tag3
;
const
char
*
tag4
;
void
(
*
read
)(
AVFormatContext
*
,
AVIOContext
*
,
int
,
char
*
,
ID3v2ExtraMeta
**
);
void
(
*
free
)();
}
ID3v2EMFunc
;
static
const
ID3v2EMFunc
id3v2_extra_meta_funcs
[]
=
{
{
"GEO"
,
"GEOB"
,
read_geobtag
,
free_geobtag
},
{
NULL
}
};
...
...
@@ -393,13 +400,12 @@ const ID3v2EMFunc ff_id3v2_extra_meta_funcs[] = {
static
const
ID3v2EMFunc
*
get_extra_meta_func
(
const
char
*
tag
,
int
isv34
)
{
int
i
=
0
;
while
(
ff_
id3v2_extra_meta_funcs
[
i
].
tag3
)
{
while
(
id3v2_extra_meta_funcs
[
i
].
tag3
)
{
if
(
!
memcmp
(
tag
,
(
isv34
?
ff_id3v2_extra_meta_funcs
[
i
].
tag4
:
ff_id3v2_extra_meta_funcs
[
i
].
tag3
),
(
isv34
?
id3v2_extra_meta_funcs
[
i
].
tag4
:
id3v2_extra_meta_funcs
[
i
].
tag3
),
(
isv34
?
4
:
3
)))
return
&
ff_
id3v2_extra_meta_funcs
[
i
];
return
&
id3v2_extra_meta_funcs
[
i
];
i
++
;
}
return
NULL
;
...
...
@@ -560,7 +566,7 @@ void ff_id3v2_read_all(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **e
}
}
while
(
found_header
);
ff_metadata_conv
(
&
s
->
metadata
,
NULL
,
ff_id3v2_34_metadata_conv
);
ff_metadata_conv
(
&
s
->
metadata
,
NULL
,
ff_
id3v2_2_metadata_conv
);
ff_metadata_conv
(
&
s
->
metadata
,
NULL
,
id3v2_2_metadata_conv
);
ff_metadata_conv
(
&
s
->
metadata
,
NULL
,
ff_id3v2_4_metadata_conv
);
merge_date
(
&
s
->
metadata
);
}
...
...
libavformat/id3v2.h
View file @
c4a37885
...
...
@@ -59,13 +59,6 @@ typedef struct ID3v2ExtraMetaGEOB {
uint8_t
*
data
;
}
ID3v2ExtraMetaGEOB
;
typedef
struct
ID3v2EMFunc
{
const
char
*
tag3
;
const
char
*
tag4
;
void
(
*
read
)(
AVFormatContext
*
,
AVIOContext
*
,
int
,
char
*
,
ID3v2ExtraMeta
**
);
void
(
*
free
)();
}
ID3v2EMFunc
;
/**
* Detect ID3v2 Header.
* @param buf must be ID3v2_HEADER_SIZE byte long
...
...
@@ -99,11 +92,8 @@ void ff_id3v2_read_all(AVFormatContext *s, const char *magic, ID3v2ExtraMeta **e
*/
void
ff_id3v2_free_extra_meta
(
ID3v2ExtraMeta
**
extra_meta
);
extern
const
ID3v2EMFunc
ff_id3v2_extra_meta_funcs
[];
extern
const
AVMetadataConv
ff_id3v2_34_metadata_conv
[];
extern
const
AVMetadataConv
ff_id3v2_4_metadata_conv
[];
extern
const
AVMetadataConv
ff_id3v2_2_metadata_conv
[];
/**
* A list of text information frames allowed in both ID3 v2.3 and v2.4
...
...
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