Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
a565c7b7
Commit
a565c7b7
authored
May 06, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aiffdec:Rewrite get_meta()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
423986fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
aiffdec.c
libavformat/aiffdec.c
+12
-11
No files found.
libavformat/aiffdec.c
View file @
a565c7b7
...
...
@@ -68,19 +68,20 @@ static int get_tag(AVIOContext *pb, uint32_t * tag)
static
void
get_meta
(
AVFormatContext
*
s
,
const
char
*
key
,
int
size
)
{
uint8_t
*
str
=
av_malloc
(
size
+
1
);
int
res
;
if
(
!
str
)
{
avio_skip
(
s
->
pb
,
size
);
return
;
}
res
=
avio_read
(
s
->
pb
,
str
,
size
);
if
(
res
<
0
)
return
;
if
(
str
)
{
int
res
=
avio_read
(
s
->
pb
,
str
,
size
);
if
(
res
<
0
){
av_free
(
str
);
return
;
}
size
+=
(
size
&
1
)
-
res
;
str
[
res
]
=
0
;
av_metadata_set2
(
&
s
->
metadata
,
key
,
str
,
AV_METADATA_DONT_STRDUP_VAL
);
}
else
size
+=
size
&
1
;
str
[
res
]
=
0
;
av_metadata_set2
(
&
s
->
metadata
,
key
,
str
,
AV_METADATA_DONT_STRDUP_VAL
);
avio_skip
(
s
->
pb
,
size
);
}
/* Returns the number of sound data frames or negative on error */
...
...
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