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
2e508585
Commit
2e508585
authored
Mar 12, 2010
by
David Conrad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oggdec: Cosmetics
Originally committed as revision 22476 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d8ba7483
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
48 deletions
+48
-48
oggparseogm.c
libavformat/oggparseogm.c
+48
-48
No files found.
libavformat/oggparseogm.c
View file @
2e508585
...
@@ -43,55 +43,55 @@ ogm_header(AVFormatContext *s, int idx)
...
@@ -43,55 +43,55 @@ ogm_header(AVFormatContext *s, int idx)
if
(
!
(
*
p
&
1
))
if
(
!
(
*
p
&
1
))
return
0
;
return
0
;
if
(
*
p
==
1
)
{
p
++
;
if
(
*
p
==
'v'
){
int
tag
;
st
->
codec
->
codec_type
=
CODEC_TYPE_VIDEO
;
p
+=
8
;
tag
=
bytestream_get_le32
(
&
p
);
st
->
codec
->
codec_id
=
ff_codec_get_id
(
ff_codec_bmp_tags
,
tag
);
st
->
codec
->
codec_tag
=
tag
;
}
else
if
(
*
p
==
't'
)
{
st
->
codec
->
codec_type
=
CODEC_TYPE_SUBTITLE
;
st
->
codec
->
codec_id
=
CODEC_ID_TEXT
;
p
+=
12
;
}
else
{
uint8_t
acid
[
5
];
int
cid
;
st
->
codec
->
codec_type
=
CODEC_TYPE_AUDIO
;
p
+=
8
;
bytestream_get_buffer
(
&
p
,
acid
,
4
);
acid
[
4
]
=
0
;
cid
=
strtol
(
acid
,
NULL
,
16
);
st
->
codec
->
codec_id
=
ff_codec_get_id
(
ff_codec_wav_tags
,
cid
);
st
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
}
p
+=
4
;
/* useless size field */
if
(
*
p
==
1
)
{
p
++
;
time_unit
=
bytestream_get_le64
(
&
p
);
spu
=
bytestream_get_le64
(
&
p
);
if
(
*
p
==
'v'
){
default_len
=
bytestream_get_le32
(
&
p
);
int
tag
;
st
->
codec
->
codec_type
=
CODEC_TYPE_VIDEO
;
p
+=
8
;
/* buffersize + bits_per_sample */
p
+=
8
;
tag
=
bytestream_get_le32
(
&
p
);
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_VIDEO
){
st
->
codec
->
codec_id
=
ff_codec_get_id
(
ff_codec_bmp_tags
,
tag
);
st
->
codec
->
width
=
bytestream_get_le32
(
&
p
);
st
->
codec
->
codec_tag
=
tag
;
st
->
codec
->
height
=
bytestream_get_le32
(
&
p
);
}
else
if
(
*
p
==
't'
)
{
st
->
codec
->
time_base
.
den
=
spu
*
10000000
;
st
->
codec
->
codec_type
=
CODEC_TYPE_SUBTITLE
;
st
->
codec
->
time_base
.
num
=
time_unit
;
st
->
codec
->
codec_id
=
CODEC_ID_TEXT
;
st
->
time_base
=
st
->
codec
->
time_base
;
p
+=
12
;
}
else
{
}
else
{
st
->
codec
->
channels
=
bytestream_get_le16
(
&
p
);
uint8_t
acid
[
5
];
p
+=
2
;
/* block_align */
int
cid
;
st
->
codec
->
bit_rate
=
bytestream_get_le32
(
&
p
)
*
8
;
st
->
codec
->
codec_type
=
CODEC_TYPE_AUDIO
;
st
->
codec
->
sample_rate
=
spu
*
10000000
/
time_unit
;
p
+=
8
;
st
->
time_base
.
num
=
1
;
bytestream_get_buffer
(
&
p
,
acid
,
4
);
st
->
time_base
.
den
=
st
->
codec
->
sample_rate
;
acid
[
4
]
=
0
;
}
cid
=
strtol
(
acid
,
NULL
,
16
);
st
->
codec
->
codec_id
=
ff_codec_get_id
(
ff_codec_wav_tags
,
cid
);
st
->
need_parsing
=
AVSTREAM_PARSE_FULL
;
}
p
+=
4
;
/* useless size field */
time_unit
=
bytestream_get_le64
(
&
p
);
spu
=
bytestream_get_le64
(
&
p
);
default_len
=
bytestream_get_le32
(
&
p
);
p
+=
8
;
/* buffersize + bits_per_sample */
if
(
st
->
codec
->
codec_type
==
CODEC_TYPE_VIDEO
){
st
->
codec
->
width
=
bytestream_get_le32
(
&
p
);
st
->
codec
->
height
=
bytestream_get_le32
(
&
p
);
st
->
codec
->
time_base
.
den
=
spu
*
10000000
;
st
->
codec
->
time_base
.
num
=
time_unit
;
st
->
time_base
=
st
->
codec
->
time_base
;
}
else
{
st
->
codec
->
channels
=
bytestream_get_le16
(
&
p
);
p
+=
2
;
/* block_align */
st
->
codec
->
bit_rate
=
bytestream_get_le32
(
&
p
)
*
8
;
st
->
codec
->
sample_rate
=
spu
*
10000000
/
time_unit
;
st
->
time_base
.
num
=
1
;
st
->
time_base
.
den
=
st
->
codec
->
sample_rate
;
}
}
else
if
(
*
p
==
3
)
{
}
else
if
(
*
p
==
3
)
{
if
(
os
->
psize
>
8
)
if
(
os
->
psize
>
8
)
ff_vorbis_comment
(
s
,
&
st
->
metadata
,
p
+
7
,
os
->
psize
-
8
);
ff_vorbis_comment
(
s
,
&
st
->
metadata
,
p
+
7
,
os
->
psize
-
8
);
...
...
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