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
838b849e
Commit
838b849e
authored
Jan 07, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v4l2: set the average framerate instead of codec timebase.
Codec timebase is supposed to be set by decoders only.
parent
246da0b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
v4l2.c
libavdevice/v4l2.c
+4
-4
No files found.
libavdevice/v4l2.c
View file @
838b849e
...
...
@@ -634,11 +634,11 @@ static int v4l2_set_parameters(AVFormatContext *s1)
return
AVERROR
(
errno
);
}
}
s1
->
streams
[
0
]
->
codec
->
time_base
.
den
=
tpf
->
denominator
;
s1
->
streams
[
0
]
->
codec
->
time_base
.
num
=
tpf
->
numerator
;
s1
->
streams
[
0
]
->
avg_frame_rate
.
num
=
tpf
->
denominator
;
s1
->
streams
[
0
]
->
avg_frame_rate
.
den
=
tpf
->
numerator
;
s
->
timeout
=
100
+
av_rescale_q
(
1
,
s1
->
streams
[
0
]
->
codec
->
time_bas
e
,
av_rescale_q
(
1
,
s1
->
streams
[
0
]
->
avg_frame_rat
e
,
(
AVRational
){
1
,
1000
});
return
0
;
...
...
@@ -779,7 +779,7 @@ static int v4l2_read_header(AVFormatContext *s1)
avcodec_pix_fmt_to_codec_tag
(
st
->
codec
->
pix_fmt
);
st
->
codec
->
width
=
s
->
width
;
st
->
codec
->
height
=
s
->
height
;
st
->
codec
->
bit_rate
=
s
->
frame_size
*
1
/
av_q2d
(
st
->
codec
->
time_bas
e
)
*
8
;
st
->
codec
->
bit_rate
=
s
->
frame_size
*
av_q2d
(
st
->
avg_frame_rat
e
)
*
8
;
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