Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
c0f14458
Commit
c0f14458
authored
16 years ago
by
Aurelien Jacobs
Browse files
Options
Downloads
Patches
Plain Diff
use new metadata API in aiff demuxer
Originally committed as revision 16966 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
33abc1a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/aiff.c
+10
-7
10 additions, 7 deletions
libavformat/aiff.c
with
10 additions
and
7 deletions
libavformat/aiff.c
+
10
−
7
View file @
c0f14458
...
...
@@ -79,9 +79,10 @@ static int get_tag(ByteIOContext *pb, uint32_t * tag)
}
/* Metadata string read */
static
void
get_meta
(
ByteIO
Context
*
pb
,
c
har
*
str
,
int
strsize
,
int
size
)
static
void
get_meta
(
AVFormat
Context
*
s
,
c
onst
char
*
key
,
int
size
)
{
int
res
=
get_buffer
(
pb
,
(
uint8_t
*
)
str
,
FFMIN
(
strsize
-
1
,
size
));
uint8_t
str
[
1024
];
int
res
=
get_buffer
(
s
->
pb
,
str
,
FFMIN
(
sizeof
(
str
)
-
1
,
size
));
if
(
res
<
0
)
return
;
...
...
@@ -90,7 +91,9 @@ static void get_meta(ByteIOContext *pb, char * str, int strsize, int size)
size
++
;
size
-=
res
;
if
(
size
)
url_fskip
(
pb
,
size
);
url_fskip
(
s
->
pb
,
size
);
av_metadata_set
(
&
s
->
metadata
,
key
,
str
);
}
/* Returns the number of sound data frames or negative on error */
...
...
@@ -351,16 +354,16 @@ static int aiff_read_header(AVFormatContext *s,
version
=
get_be32
(
pb
);
break
;
case
MKTAG
(
'N'
,
'A'
,
'M'
,
'E'
):
/* Sample name chunk */
get_meta
(
pb
,
s
->
title
,
sizeof
(
s
->
title
)
,
size
);
get_meta
(
s
,
"title"
,
size
);
break
;
case
MKTAG
(
'A'
,
'U'
,
'T'
,
'H'
):
/* Author chunk */
get_meta
(
pb
,
s
->
author
,
sizeof
(
s
->
author
)
,
size
);
get_meta
(
s
,
"
author
"
,
size
);
break
;
case
MKTAG
(
'('
,
'c'
,
')'
,
' '
):
/* Copyright chunk */
get_meta
(
pb
,
s
->
copyright
,
sizeof
(
s
->
copyright
)
,
size
);
get_meta
(
s
,
"
copyright
"
,
size
);
break
;
case
MKTAG
(
'A'
,
'N'
,
'N'
,
'O'
):
/* Annotation chunk */
get_meta
(
pb
,
s
->
comment
,
sizeof
(
s
->
comment
)
,
size
);
get_meta
(
s
,
"
comment
"
,
size
);
break
;
case
MKTAG
(
'S'
,
'S'
,
'N'
,
'D'
):
/* Sampled sound chunk */
offset
=
get_be32
(
pb
);
/* Offset of sound data */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment