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
4bd684bc
Commit
4bd684bc
authored
Jun 24, 2007
by
Måns Rullgård
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace cosmetics
Originally committed as revision 9410 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
1eb1f6fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
oggparsevorbis.c
libavformat/oggparsevorbis.c
+24
-24
No files found.
libavformat/oggparsevorbis.c
View file @
4bd684bc
...
...
@@ -30,7 +30,7 @@
#include "avstring.h"
extern
int
vorbis_comment
(
AVFormatContext
*
as
,
uint8_t
*
buf
,
int
size
)
vorbis_comment
(
AVFormatContext
*
as
,
uint8_t
*
buf
,
int
size
)
{
char
*
p
=
buf
;
int
s
,
n
,
j
;
...
...
@@ -52,7 +52,7 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size)
p
+=
4
;
size
-=
4
;
while
(
size
>=
4
){
while
(
size
>=
4
)
{
char
*
t
,
*
v
;
int
tl
,
vl
;
...
...
@@ -68,7 +68,7 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size)
size
-=
s
;
n
--
;
v
=
memchr
(
t
,
'='
,
s
);
v
=
memchr
(
t
,
'='
,
s
);
if
(
!
v
)
continue
;
...
...
@@ -76,30 +76,30 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size)
vl
=
s
-
tl
-
1
;
v
++
;
if
(
tl
&&
vl
){
if
(
tl
&&
vl
)
{
char
tt
[
tl
+
1
];
char
ct
[
vl
+
1
];
for
(
j
=
0
;
j
<
tl
;
j
++
)
tt
[
j
]
=
toupper
(
t
[
j
]);
tt
[
j
]
=
toupper
(
t
[
j
]);
tt
[
tl
]
=
0
;
memcpy
(
ct
,
v
,
vl
);
memcpy
(
ct
,
v
,
vl
);
ct
[
vl
]
=
0
;
// took from Vorbis_I_spec
if
(
!
strcmp
(
tt
,
"AUTHOR"
)
||
!
strcmp
(
tt
,
"ARTIST"
))
av_strlcpy
(
as
->
author
,
ct
,
sizeof
(
as
->
author
));
else
if
(
!
strcmp
(
tt
,
"TITLE"
))
av_strlcpy
(
as
->
title
,
ct
,
sizeof
(
as
->
title
));
else
if
(
!
strcmp
(
tt
,
"COPYRIGHT"
))
av_strlcpy
(
as
->
copyright
,
ct
,
sizeof
(
as
->
copyright
));
else
if
(
!
strcmp
(
tt
,
"DESCRIPTION"
))
av_strlcpy
(
as
->
comment
,
ct
,
sizeof
(
as
->
comment
));
else
if
(
!
strcmp
(
tt
,
"GENRE"
))
av_strlcpy
(
as
->
genre
,
ct
,
sizeof
(
as
->
genre
));
else
if
(
!
strcmp
(
tt
,
"TRACKNUMBER"
))
as
->
track
=
atoi
(
ct
);
if
(
!
strcmp
(
tt
,
"AUTHOR"
)
||
!
strcmp
(
tt
,
"ARTIST"
))
av_strlcpy
(
as
->
author
,
ct
,
sizeof
(
as
->
author
));
else
if
(
!
strcmp
(
tt
,
"TITLE"
))
av_strlcpy
(
as
->
title
,
ct
,
sizeof
(
as
->
title
));
else
if
(
!
strcmp
(
tt
,
"COPYRIGHT"
))
av_strlcpy
(
as
->
copyright
,
ct
,
sizeof
(
as
->
copyright
));
else
if
(
!
strcmp
(
tt
,
"DESCRIPTION"
))
av_strlcpy
(
as
->
comment
,
ct
,
sizeof
(
as
->
comment
));
else
if
(
!
strcmp
(
tt
,
"GENRE"
))
av_strlcpy
(
as
->
genre
,
ct
,
sizeof
(
as
->
genre
));
else
if
(
!
strcmp
(
tt
,
"TRACKNUMBER"
))
as
->
track
=
atoi
(
ct
);
else
if
(
!
strcmp
(
tt
,
"ALBUM"
))
av_strlcpy
(
as
->
album
,
ct
,
sizeof
(
as
->
album
));
else
if
(
!
strcmp
(
tt
,
"GENRE"
))
...
...
@@ -110,10 +110,10 @@ vorbis_comment (AVFormatContext * as, uint8_t *buf, int size)
}
if
(
size
>
0
)
av_log
(
as
,
AV_LOG_INFO
,
"%i bytes of comment header remain
\n
"
,
size
);
av_log
(
as
,
AV_LOG_INFO
,
"%i bytes of comment header remain
\n
"
,
size
);
if
(
n
>
0
)
av_log
(
as
,
AV_LOG_INFO
,
"truncated comment header, %i comments not found
\n
"
,
n
);
av_log
(
as
,
AV_LOG_INFO
,
"truncated comment header, %i comments not found
\n
"
,
n
);
return
0
;
}
...
...
@@ -152,7 +152,7 @@ fixup_vorbis_headers(AVFormatContext * as, oggvorbis_private_t *priv,
offset
=
1
;
offset
+=
av_xiphlacing
(
&
ptr
[
offset
],
priv
->
len
[
0
]);
offset
+=
av_xiphlacing
(
&
ptr
[
offset
],
priv
->
len
[
1
]);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
memcpy
(
&
ptr
[
offset
],
priv
->
packet
[
i
],
priv
->
len
[
i
]);
offset
+=
priv
->
len
[
i
];
}
...
...
@@ -172,9 +172,9 @@ vorbis_header (AVFormatContext * s, int idx)
if
(
os
->
seq
>
2
)
return
0
;
if
(
os
->
seq
==
0
)
{
if
(
os
->
seq
==
0
)
{
os
->
private
=
av_mallocz
(
sizeof
(
oggvorbis_private_t
));
if
(
!
os
->
private
)
if
(
!
os
->
private
)
return
0
;
}
...
...
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