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
1bb3990b
Commit
1bb3990b
authored
Nov 24, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ogg: don't set codec timebase
Demuxers are not supposed to set it.
parent
1d3144c3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
oggparseogm.c
libavformat/oggparseogm.c
+2
-5
oggparsetheora.c
libavformat/oggparsetheora.c
+7
-6
No files found.
libavformat/oggparseogm.c
View file @
1bb3990b
...
...
@@ -80,9 +80,7 @@ ogm_header(AVFormatContext *s, int idx)
if
(
st
->
codec
->
codec_type
==
AVMEDIA_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
;
avpriv_set_pts_info
(
st
,
64
,
st
->
codec
->
time_base
.
num
,
st
->
codec
->
time_base
.
den
);
avpriv_set_pts_info
(
st
,
64
,
spu
*
10000000
,
time_unit
);
}
else
{
st
->
codec
->
channels
=
bytestream_get_le16
(
&
p
);
p
+=
2
;
/* block_align */
...
...
@@ -117,8 +115,7 @@ ogm_dshow_header(AVFormatContext *s, int idx)
if
(
t
==
0x05589f80
){
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_id
=
ff_codec_get_id
(
ff_codec_bmp_tags
,
AV_RL32
(
p
+
68
));
st
->
codec
->
time_base
.
den
=
10000000
;
st
->
codec
->
time_base
.
num
=
AV_RL64
(
p
+
164
);
avpriv_set_pts_info
(
st
,
64
,
AV_RL64
(
p
+
164
),
10000000
);
st
->
codec
->
width
=
AV_RL32
(
p
+
176
);
st
->
codec
->
height
=
AV_RL32
(
p
+
180
);
}
else
if
(
t
==
0x05589f81
){
...
...
libavformat/oggparsetheora.c
View file @
1bb3990b
...
...
@@ -56,6 +56,7 @@ theora_header (AVFormatContext * s, int idx)
if
(
os
->
buf
[
os
->
pstart
]
==
0x80
)
{
GetBitContext
gb
;
int
width
,
height
;
AVRational
timebase
;
init_get_bits
(
&
gb
,
os
->
buf
+
os
->
pstart
,
os
->
psize
*
8
);
...
...
@@ -85,14 +86,14 @@ theora_header (AVFormatContext * s, int idx)
skip_bits
(
&
gb
,
16
);
}
st
->
codec
->
time_
base
.
den
=
get_bits_long
(
&
gb
,
32
);
st
->
codec
->
time_
base
.
num
=
get_bits_long
(
&
gb
,
32
);
if
(
!
(
st
->
codec
->
time_base
.
num
>
0
&&
st
->
codec
->
time_
base
.
den
>
0
))
{
time
base
.
den
=
get_bits_long
(
&
gb
,
32
);
time
base
.
num
=
get_bits_long
(
&
gb
,
32
);
if
(
!
(
timebase
.
num
>
0
&&
time
base
.
den
>
0
))
{
av_log
(
s
,
AV_LOG_WARNING
,
"Invalid time base in theora stream, assuming 25 FPS
\n
"
);
st
->
codec
->
time_
base
.
num
=
1
;
st
->
codec
->
time_
base
.
den
=
25
;
time
base
.
num
=
1
;
time
base
.
den
=
25
;
}
avpriv_set_pts_info
(
st
,
64
,
st
->
codec
->
time_base
.
num
,
st
->
codec
->
time_
base
.
den
);
avpriv_set_pts_info
(
st
,
64
,
timebase
.
num
,
time
base
.
den
);
st
->
sample_aspect_ratio
.
num
=
get_bits_long
(
&
gb
,
24
);
st
->
sample_aspect_ratio
.
den
=
get_bits_long
(
&
gb
,
24
);
...
...
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